Author Topic: How to remove last 4 digits in a file name - batch  (Read 2608 times)

Offline hilmartor

  • Full Member
  • ***
  • Posts: 178
    • View Profile
How to remove last 4 digits in a file name - batch
« on: June 05, 2007, 03:13:24 AM »
Hi,

Sometimes I take photos of people and I mark them with a _01 to _05 etc. Now I have a batch of photos with different filenames and I want to remove the _01 form the end of the filename. Is there a way to batch this while not changing the filename itself. I cannot rename them all since they have different filenames.

Any idea?

-Hilmar

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24756
    • View Profile
    • Camera Bits, Inc.
Re: How to remove last 4 digits in a file name - batch
« Reply #1 on: June 05, 2007, 07:16:35 AM »
Hilmar,

Sometimes I take photos of people and I mark them with a _01 to _05 etc. Now I have a batch of photos with different filenames and I want to remove the _01 form the end of the filename. Is there a way to batch this while not changing the filename itself. I cannot rename them all since they have different filenames.

It looks like you really want to remove the last three characters.  You can do that like this:

{filenamebase:0,-3}

You'll have to use this in a Rename.  If you want to preview how this would look, you could put the above in one of your Contact Sheet labels (Preferences->Contact Sheet).

-Kirk