Author Topic: Rename folders on ingest using code replacements?  (Read 273 times)

Offline JeffV

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Rename folders on ingest using code replacements?
« on: January 18, 2017, 07:57:22 pm »
I shoot each competitor at an event in a unique folder on the camera.  I am ingesting files that are contained in folders that look like this, for example:

853NC_D4
901NC_D5
903NC_D5

Currently I manually rename each of these folders to reflect the name of the competitor. That is a lot of renaming at a big event.

If I have a code replacement file that contains the following:

853   Joe Smith
901   Susan Jones
903   Silly Billy

Is it possible to use variables and code replacements so that when I ingest the images, PM will rename the folders to look like this?

853 Joe Smith
901 Susan Jones
903 Silly Billy

I currently am able to rename the folder using {foldernum} to rename the ingested folder to just the first 3 digits (853, 901, 903, etc.).  Where I am stuck is trying to do a code replacement to add the competitor's name to the folder name.  Is it possible?  It would save me hours of typing (and eliminate typos) at each event if I could get this to work.

Any help would be greatly appreciated.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 17355
    • View Profile
    • Camera Bits, Inc.
Re: Rename folders on ingest using code replacements?
« Reply #1 on: January 18, 2017, 10:08:58 pm »
Jeff,

I shoot each competitor at an event in a unique folder on the camera.  I am ingesting files that are contained in folders that look like this, for example:

853NC_D4
901NC_D5
903NC_D5

Currently I manually rename each of these folders to reflect the name of the competitor. That is a lot of renaming at a big event.

If I have a code replacement file that contains the following:

853   Joe Smith
901   Susan Jones
903   Silly Billy

Is it possible to use variables and code replacements so that when I ingest the images, PM will rename the folders to look like this?

853 Joe Smith
901 Susan Jones
903 Silly Billy

I currently am able to rename the folder using {foldernum} to rename the ingested folder to just the first 3 digits (853, 901, 903, etc.).  Where I am stuck is trying to do a code replacement to add the competitor's name to the folder name.  Is it possible?  It would save me hours of typing (and eliminate typos) at each event if I could get this to work.

Any help would be greatly appreciated.

Yes, it should be possible.  You may need to change your Code Replacement delimiter character.  The default is '\' which is a valid path separator on Windows and will conflict with the operation of Code Replacement.  For instance, choose '=' as your delimiter character and you should be able to use ={foldernum}= in your Ingest Folder Name to build your path.

HTH,

-Kirk

Offline JeffV

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Re: Rename folders on ingest using code replacements?
« Reply #2 on: January 18, 2017, 11:36:34 pm »
That works perfectly when using = as the delimiter.  What took me two weeks to sort and edit last spring took me 5 days last week with PM. This should save me at least another day and reduce errors due to typos.  Awesome! Thank you!!!