You are not logged in.
Hello,
I hope someone can help me.
I want to write a command which i can run as a batch file in order to bulk rename files.
The task at hand is this: I have a selection of pdf files, named as follows
XXXXX-1000_ABC.PDF
XXXXX-1001_ABC.PDF
XXXXX-1002_ABC.PDF etc
and I want to rename them as follows:
1000.pdf
1001.pdf
1002.pdf
The logic i guess is search for the '-', and rename as the following 4 digits, removing all other text?
Im sure someone could do this and if so I would be very impressed, and grateful, if they could help me.
Kind Regards,
Martin
Offline
untested! - something like..
for /f "tokens=1,2,3 delims=-_." %%G in (*.PDF) do ECHO ren %%G-%%H_%%I.PDF %%H.PDF
Offline