Renaming
F2 renames the row under the cursor. ⇧F2 renames many at once from a pattern, and shows every name beside what it would become before anything changes.
| Key | Action |
|---|---|
| F2 | Rename |
| ⇧F2 | Bulk rename… |
One name
F2 asks for a new name, with the part before the extension selected — type, and the extension stays.
- A name that is taken is refused, with the reason under the field, rather than written over.
- A name with
/in it is refused as you type, so a rename never moves anything. - Changing only capitals —
readme.mdtoREADME.md— works. On a case-sensitive disk, where those can be two files, it is refused when one of that exact name is already there. - The row keeps the cursor under its new name.
Many names
With rows marked, F2 opens Rename … items for all of them. ⇧F2 opens it too, and for the row under the cursor when nothing is marked — so does pressing F2 twice in quick succession, and the last row of the screen says so while a second press would.
- Find
- What to look for in each name. It is found anywhere in the name, and every place it is found is replaced. Left empty, it is the whole name.
- Replace with
- What goes there. Left empty, what was found is taken out.
- Search with
- wildcard or regular expression. The choice is remembered.
- Match case
- Unticked,
imgfindsIMG. - Extension too
- Unticked, a file’s extension is left as it is and nothing is found in it. Ticked, the whole name is searched and changed. A folder has no extension.
- Case
- as it is, lower, UPPER or Title — applied after the replacement, and enough to ask for by itself.
- Counter
- Where
[C]starts, how far it steps, and the fewest digits it is written in.
Both fields remember what was accepted in them: ⌥↓ opens the list.
As a wildcard
* is any run of characters and ? is any one. In Replace with, each * and ? is what the one
in the same place in Find found.
| Find | Replace with | IMG_4127.jpg becomes |
|---|---|---|
IMG_ |
harbor- |
harbor-4127.jpg |
IMG_* |
harbor-* |
harbor-4127.jpg |
_ |
IMG4127.jpg |
|
walk-* |
walk-IMG_4127.jpg |
As a regular expression
The expression is .NET’s, groups, lookarounds and back-references included. In Replace with, $1
is the first group and $0 everything matched.
| Find | Replace with | 2024-03-01 notes.txt becomes |
|---|---|---|
(\d+)-(\d+)-(\d+) |
$3-$2-$1 |
01-03-2024 notes.txt |
^ |
old |
old 2024-03-01 notes.txt |
\s+ |
_ |
2024-03-01_notes.txt |
An expression that takes too long on a name is given up on: the line under the list says The pattern took too long, and nothing can be renamed until it is changed.
The name, the extension and a counter
In Replace with, under either reading:
[N] |
The name as it was, without its extension |
[E] |
Its extension |
[C] |
A number, counting up from one renamed row to the next |
- The counter counts in the order the pane lists the rows, so sort the pane first.
- A row nothing was found in keeps its name and uses no number.
- digits starts at as many as the last number needs, so
01to12sort in order. - With Find empty,
walk-[C]names every rowwalk-01,walk-02, and so on, each keeping its extension.
The list
Now is each name as it is, Renamed to what it would become, in the order the pane lists them. A row the pattern leaves alone is gray. Nothing is renamed that was not showing here.
A row in red could not have its name, and says why:
| same as another | Two of the rows would get the same name |
| already here | Something else in the folder has that name |
| no name left, not a name, has a path separator, too long | What came out is not a name |
- While any row is red, Rename does nothing. Change the pattern.
- Two names count as the same when they differ only in capitals, on every disk.
- A name another row is leaving is free. So
1,2,3can become2,3,4, and two rows can swap names: the renames are made in an order that works.
What it does
Enter renames every row with a new name, as one operation: a panel watches it, it can be sent to the background or stopped, and it is one entry in the journal with a step for each row.
- Nothing is ever renamed over another file. A name taken since the list was made is asked about in Could not rename: Try again, Skip, Skip all or Stop.
- Stopped part of the way, every row has either its old name or its new one.
- When it finishes nothing is left marked, and the cursor is on the row it was on, under its new name. A row that could not be renamed stays marked.
- In a pane of search results, each file is renamed in the folder it is in.
- There is no undo. The journal says, step by step, which renames could still be put back.