Batch Rename with <#0001> + /cut without collisions (replace old numbers safely)

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Lusayalumino
Posts: 115
Joined: 13 Aug 2018 07:16
Location: USA

Batch Rename with <#0001> + /cut without collisions (replace old numbers safely)

Post by Lusayalumino »

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
XYPlorer, Great Form -- Awesome Function

Post Reply