Files#

The Files pane is a filesystem and directory browser built right into Spyder. You can view and filter files according to their type and extension, open them with the Editor or an external tool, and perform many common operations.

Spyder Files pane, showing a tree view of files and metadata

File operations#

To browse the files on your system, use the arrows at the top of the pane. You can expand/collapse the folders in the pane to display the files and subdirectories hierarchically. Double-clicking a folder will open it, showing the files inside and making it your working directory.

Spyder Files pane showing browsing directories

To open a file in the Editor from the Files pane, double-click its name. If you right-click over it, you will see a context menu that allows you to access a number of functions, including running scripts; creating, renaming, moving, deleting files; and opening them in your computer’s file manager.

Spyder Files pane showing context menu

You can copy and paste one or several files to and from the pane, and copy their absolute or relative paths to the clipboard as text. If copying the paths for multiple files, they will be automatically formatted so you can paste them directly into a Python list.

Spyder Files pane showing copying absolute path to Editor

Version control support#

The Files pane allows you to perform basic operations with the Git distributed version control system, like committing your changes and browsing the repository a given file or folder is part of. This is particularly useful when you’re working in Spyder Projects.

Spyder Files pane showing committing change of file

Options menu#

The options menu in the top right of the Files pane offers several ways to customize how your files are displayed.

By default, the pane displays the contents of your working directory without filtering. However, it can filter the list to show only files matching the patterns set under Show filenames with these extensions…, if you toggle the Filter filenames button in the pane toolbar.

Spyder Files pane showing filtering files

You can also activate the Show hidden files option, which will display files that are invisible by default in your operating system.

Additionally, you can change which file attributes you want to see by hiding or displaying the Type, Size and Date Modified columns using the corresponding menu options.

Spyder Files pane showing columns checked and shown

The menu also gives you the option to open files and directories with a single instead of a double click, to suit your preferences.

File associations#

Files allows you to associate different external applications with specific file extensions they can open. Under the File associations tab of the Files preferences pane, you can add file types and set the external program used to open each of them by default.

Spyder Files pane showing files associations

Once you’ve set this up, files will automatically launch in the associated application when opened from Spyder’s Files pane. Additionally, when you right-click a file, you will find an Open with… option that will allow you to select from the applications associated with this extension.

Spyder Files pane showing opening file with associated program