Author Topic: File renaming  (Read 264 times)

Offline Dewcal

  • Newcomer
  • *
  • Posts: 33
    • View Profile
File renaming
« on: December 19, 2020, 08:14:34 AM »
For some reason I have ended up with ome 400 files which are named "21-09-16_A12345" where _A12345 is the original RAW file name from the camera.  Several of the images will have been culled / deleted so there will NOT be a continuous sequence of the original RAW filenames.
Is it possible to remove the "21-09-16" from each of the file names using PM+ and manitain the origianl file name?
I can see how to add various fields and change names but not how to delete.  I know I can go through Windows Explorer and manually change each file name but would prefer not to have to do this!
TIA for any help.

Online Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 22288
    • View Profile
    • Camera Bits, Inc.
Re: File renaming
« Reply #1 on: December 19, 2020, 11:57:59 AM »
For some reason I have ended up with ome 400 files which are named "21-09-16_A12345" where _A12345 is the original RAW file name from the camera.  Several of the images will have been culled / deleted so there will NOT be a continuous sequence of the original RAW filenames.
Is it possible to remove the "21-09-16" from each of the file names using PM+ and manitain the origianl file name?
I can see how to add various fields and change names but not how to delete.  I know I can go through Windows Explorer and manually change each file name but would prefer not to have to do this!
TIA for any help.

Yes, it's definitely possible to do the renaming as you desire.  Variables in Photo Mechanic can extract a portion of their value.  The feature is called Variable Substring Extraction and it is documented here, with examples: https://docs.camerabits.com/support/solutions/articles/48001077381-variable-substring-extraction

For your specific case, you would use:

{filenamebase:-7}

Which would extract the last seven letters in the filename (the _A12345 part).

HTH,

-Kirk

Offline Dewcal

  • Newcomer
  • *
  • Posts: 33
    • View Profile
Re: File renaming
« Reply #2 on: December 20, 2020, 12:05:59 AM »
Kirk,
Many thanks for prompt and helpful reply - very much appreciated. As a new user, PMP+ is getting better for me all the time.

Thanks again,
Dave