Batch Rename with <#0001> + /cut without collisions (replace old numbers safely)
Posted: 19 Oct 2025 20:18
I thought I'd post this in case it might help somebody else...
I had a bunch of files named like this (also note the accidental double space before "Tau"):
Starfield 1166 Tau Ceti II-a Orbital Station.JPG
Starfield 1167 Tau Ceti II-a Orbital Station.JPG
Starfield 1168 Tau Ceti II-a Orbital Station best curate.JPG
I needed to rename them like this:
Starfield 1301 Tau Ceti II-a Orbital Station.JPG
Starfield 1302 Tau Ceti II-a Orbital Station.JPG
Starfield 1303 Tau Ceti II-a Orbital Station best curate.JPG
At first it was failing with collisions… Then I realized the counter must be introduced BEFORE removing the old index -- otherwise the files temporarily collapse to identical names and XY blocks the rename, yielding this:
Tau Ceti II-a Orbital Station.JPG
Tau Ceti II-a Orbital Station.JPG
Here's the final Batch Rename:
Starfield <#1301> */cut 17,0
NOTE:
"Starfield" = 9 chars (positions 1–9)
1 space = pos 10
digits "1166" = pos 11–14
double space = pos 15–16
"T" of Tau = pos 17
I had a bunch of files named like this (also note the accidental double space before "Tau"):
Starfield 1166 Tau Ceti II-a Orbital Station.JPG
Starfield 1167 Tau Ceti II-a Orbital Station.JPG
Starfield 1168 Tau Ceti II-a Orbital Station best curate.JPG
I needed to rename them like this:
Starfield 1301 Tau Ceti II-a Orbital Station.JPG
Starfield 1302 Tau Ceti II-a Orbital Station.JPG
Starfield 1303 Tau Ceti II-a Orbital Station best curate.JPG
At first it was failing with collisions… Then I realized the counter must be introduced BEFORE removing the old index -- otherwise the files temporarily collapse to identical names and XY blocks the rename, yielding this:
Tau Ceti II-a Orbital Station.JPG
Tau Ceti II-a Orbital Station.JPG
Here's the final Batch Rename:
Starfield <#1301> */cut 17,0
NOTE:
"Starfield" = 9 chars (positions 1–9)
1 space = pos 10
digits "1166" = pos 11–14
double space = pos 15–16
"T" of Tau = pos 17