Author Topic: Batch file renaming  (Read 2717 times)

Offline jeremynicholl

  • Newcomer
  • *
  • Posts: 17
    • View Profile
Batch file renaming
« on: August 08, 2012, 12:34:56 AM »
Is there any way to batch rename files in PM by inserting an extra digit into the file name? For example, I have a batch of files that begin with the prefix <ru> followed by a 5 digit number; I want to replace <ru> with <ru1> and retain the existing following 5 digit number. So:
ru94829 becomes ru194829
ru94845 becomes ru194845
ru94857 becomes ru194857
Etc, etc.

I used to be able to do this easily in iView Mediapro, which I could tell to replace <ru> with <ru1>, but I don’t see any way to do that in Photomechanic.

Offline Sven

  • Uber Member
  • ******
  • Posts: 1053
    • View Profile
Re: Batch file renaming
« Reply #1 on: August 08, 2012, 12:44:50 AM »
Hi Jeremy!

You can use the following variables in the rename-dialog:

{filenamebase:0,2}1{filenamebase:2}

This will use the first 2 characters of the filename, adds the digit "1" after them and fills up the remaining characters starting from the 3rd character of the filename.

hth
Sven
After 5 years of absence I restarted the photography.

Offline jeremynicholl

  • Newcomer
  • *
  • Posts: 17
    • View Profile
Re: Batch file renaming
« Reply #2 on: August 08, 2012, 01:51:44 AM »
Hi Sven,

Brilliant, works perfectly! Thanks very much, you are indeed a Hero Member!

Offline Sven

  • Uber Member
  • ******
  • Posts: 1053
    • View Profile
Re: Batch file renaming
« Reply #3 on: August 08, 2012, 01:52:50 AM »
glad to help :)
After 5 years of absence I restarted the photography.