Rename, delete, and inspect
These operations use the selected entries, or the focused entry when there is no selection. To copy or move files, see Copy and move.
Create and rename
Section titled “Create and rename”- F2 renames the focused entry.
- F7 creates a directory. A relative path such as
a/b/ccreates any missing folders along the way. - Create File, in the command palette, creates a file. An existing file of that name is left untouched.
- Shift + F4 creates a file and opens it in the editor; for an existing name it just opens that file.
The Rename dialog selects the name up to its extension, so typing replaces the
name and keeps the type: in report.final.pdf, report.final is selected.
Directories and names such as .bashrc are selected whole.
Rename stays within the current filesystem; on S3 it is a server-side copy
followed by deletion. Case-only renames, such as Foo to foo on a
case-insensitive volume, work. Renaming onto another file asks whether to skip
or overwrite it; renaming a folder onto an existing folder asks whether to
merge, replace, or skip.
Batch rename
Section titled “Batch rename”Press Shift + F2 to rename every selected entry, or the focused one, with a single find and replace. The Rename dialog’s Batch Rename… button switches to it on the same selection. Only names change: a selected folder’s contents are left alone, and a new name containing a separator is an error rather than a move.
Find is a regular expression matched anywhere in the name, extension
included, and every match is replaced; lookaround and backreferences are not
supported. Replace uses VS Code’s syntax: $1 or $<name> inserts a
group, $& or $0 the whole match, $$ a dollar sign, and \u, \l, \U,
or \L before a group changes its case. For example, IMG_(\d+) replaced
with lisbon-$1 turns IMG_4102.HEIC into lisbon-4102.HEIC, and ^
replaced with some text adds a prefix.
Matching ignores case unless you turn on Aa (Alt + C, or Option + Command + C on macOS). AB (Alt + P, or Option + Command + P) makes each replacement take the case of the text it replaces.
The preview updates as you type and can be filtered to renamed entries or problems; F8 and Shift + F8 jump between problems. Errors, such as an empty or invalid name or two entries ending up with the same name, block the rename. Warnings do not: a new name that replaces an entry outside the selection, or one that may clash on a case-insensitive filesystem.
The rename is cancellable. Names can be swapped or shifted along, such as 1
to 2 and 2 to 3, without one entry overwriting another; an existing
entry outside the batch gets the usual Skip or Overwrite prompt. In a search
pane each hit is renamed in its own folder. Afterwards the renamed entries
stay selected, ready for another pass.
Delete and trash
Section titled “Delete and trash”Press F8, Delete, or the platform alternative to delete. On local filesystems deletion uses the operating system’s trash by default. Press Shift + Delete to delete permanently.
Deleting from a search pane deletes the underlying file. Deleting a symbolic link or Windows junction removes the link, not the target, and recursive deletion does not descend through links.
On Unix, permanent recursive deletion also stops at filesystems mounted below the selection and reports them as skipped. To include their contents, enable Descend into mount points under More options in the permanent-delete confirmation. The Move to Trash confirmation has no such option.
Properties
Section titled “Properties”Press Alt + Enter to inspect metadata. Depending on the filesystem, this can include timestamps, ownership, Unix permissions, symlink targets, S3 metadata, content type, cache control, storage class, and ACLs.
You can edit only what the filesystem supports; archives and disc images are read-only. The Unix permission and ownership editor is not available on S3, in archives, or for local Windows files. Owner and group take a numeric ID, not an account name.
Apply recursively, for a directory or a multi-selection, applies the changes to everything below; with nothing edited, it applies the permissions shown to the whole tree. It stays out of filesystems mounted below the selection unless you enable Descend into mount points.
Directory Properties, in the command palette and the context menus of the path bar and the pane’s empty space, shows the current directory itself. For a volume root, Properties also shows the volume’s filesystem, label, capacity, and free space; selecting the free-space value in the pane header opens the same view.
On Windows, the file-list context menu ends with Windows Menu, which opens the classic Windows shell menu for local files; Shift + right-click opens it directly. In an elevated session its commands still run as the normal desktop user.
Calculate directory sizes
Section titled “Calculate directory sizes”Directories normally show — in the Size column instead of walking their
contents automatically.
- Mod + Shift + Enter calculates selected or focused directories.
- Shift + Alt + Enter calculates every directory in the current directory.
Totals fill in the Size column and take part in size sorting. Press Escape to stop; values computed so far remain, marked partial.
Calculations do not follow directory links and stay on one filesystem. If a
subtree cannot be read, the value ends in + to show it is a lower bound.