Author Topic: How to replace first four characters in file name?  (Read 2602 times)

Offline dougstroud

  • Newcomer
  • *
  • Posts: 37
    • View Profile
How to replace first four characters in file name?
« on: May 23, 2015, 07:01:47 PM »
Greetings,
Can someone help me in a way to replace the first four characters of filenames? I sequenced the files and forgot to reset the sequence setting.

Thanks,

Doug

Offline Odd Skjaeveland

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: How to replace first four characters in file name?
« Reply #1 on: May 24, 2015, 12:39:39 AM »
Can someone help me in a way to replace the first four characters of filenames?

Select photos in a contact sheet, then menu File->Rename Photos...

Unsurprisingly; {filename} returns the filename from beginning to end. The variant {filename:4} returns the rightmost part of the filename, it skips the first 4 characters (technically it picks up at the 4th position counting from zero).

If the current filename is "abcdefghij.jpg" then the renaming string w_{filename:4} should become "w_efghij.jpg", replacing the first 4 characters by two others (w_). Try wxyz{filename:4} to get "wxyzefghij.jpg". Try {seqn}{filename:4} to replace the first four characters with the sequence number, try {seqn}_YOUR_TEXT_{filename:4} if you also want some text between the sequence number and said part of the current filename. Tick "sequence" if you want to use {seqn}. Study the example result PM displays in the dialog to verify that PM will do what you want it to do. Modify the renaming string as required and click OK when the example result looks right.

--
Odd S.
--
Odd S.

Offline fabianlujan

  • Full Member
  • ***
  • Posts: 107
  • sports photographer
    • View Profile
Re: How to replace first four characters in file name?
« Reply #2 on: May 26, 2015, 05:01:56 AM »
Greetings,
Can someone help me in a way to replace the first four characters of filenames? I sequenced the files and forgot to reset the sequence setting.

Thanks,

Doug

For any renaming purposes, refer to ReNamer... THE BEST
http://www.den4b.com/?x=news&article=2084#n2084