Northern Commander

Rename a shoot's photos

You end with harbor-01.heic to harbor-12.heic in place of IMG_4103.heic and the rest, numbered in the order they were taken, and one entry in the journal that says what each was called before.

1. Put them in the order to number

The counter follows the order the pane lists the rows in. ⌘F2 and choose Date, which puts the newest first; choose Date again to turn it round, so the first photo taken gets 01.

2. Mark what to rename

⌘A marks everything in the folder. To leave some out, + with *.heic marks only the photos, or mark rows one at a time with Space. Marking has the rest.

3. Say what the names become

F2 opens Rename … items for the marked rows.

  1. In Find, type IMG_* — every name that has the camera’s prefix in it.
  2. Tab, and in Replace with type harbor-[C]. [C] is the counter.
Twelve photos get a name and a number. notes.txt has no IMG_ in it, so it is gray and keeps its name.

The list changes as you type. A row the pattern does not find — notes.txt here — is gray, keeps its name and uses no number. digits is already as many as the last number needs, so harbor-09 sorts before harbor-10.

4. Read the list before agreeing

A row in red could not have its name, and says why: here one of the new names is already in the folder.

While any row is red, Rename does nothing.

Change the pattern until nothing is red — a different name, or a counter that starts higher in Counter from.

5. Rename

Enter renames them all as one operation. Nothing is renamed over another file, and when it finishes nothing is left marked. ⇧⌘J has it as one entry, with a step for each photo saying what it was called — see The journal.

Variations

  • Keep the camera’s number. Find IMG_*, Replace with harbor-*: the * is what the one in Find found, so IMG_4127.heic becomes harbor-4127.heic.
  • Number everything, whatever it is called. Leave Find empty: walk-[C] names every marked row walk-01, walk-02, each keeping its extension.
  • Put the name after the number. [C]-[N] makes 01-IMG_4103.heic; [N] is the name as it was.
  • Lower-case extensions. Tick Extension too and choose lower under Case, with both fields empty: IMG_4103.HEIC becomes img_4103.heic.
  • Turn a date round. Search with regular expression, Find (\d+)-(\d+)-(\d+), Replace with $3-$2-$1: 2024-03-01 notes.txt becomes 01-03-2024 notes.txt.
  • One file. With nothing marked, ⇧F2 opens the same dialog for the row under the cursor.

Everything the dialog can do is under Renaming.