Author Topic: Renaming photos during ingest - How to strip invalid characters  (Read 4199 times)

Offline Junction10

  • Member
  • **
  • Posts: 66
    • View Profile
    • Junction10 Photography
Renaming photos during ingest - How to strip invalid characters
« on: October 11, 2011, 03:19:41 PM »
When I'm ingesting my music photos, I use the {jobname} field for the name of the artist, and then use the {jobname} field in the "Rename files during ingest" field….

Never had a problem…  until I updated my PhotoCart site to the latest build, and it's broken the SQL syntax…

I've discovered it's because some of the files have apostrophes in them - e.g.: "Daniel_O'Donnell", "60's Festival" etc.

Is there any way of still using apostrophe's in the Jobname field, but that when it's detected in file/rename functions it strips invalid characters? (or rather, specific characters rather than invalid ones)? 
My whole workflow relies on the {Jobname} field so I don't want to lose the ability to use ' in that..  but just don't want them in my filenames.. 

Any idea?

 
iMac 27" 5K Retina 2017 -  4.2ghz 64gb RAM 1Tb HD, OSX Mojave
MacBook Pro 16" M1 Max 24 core GPU, 2Tb SSD, 64gb RAM

https://www.junction10.photography/

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Renaming photos during ingest - How to strip invalid characters
« Reply #1 on: October 11, 2011, 03:32:59 PM »
When I'm ingesting my music photos, I use the {jobname} field for the name of the artist, and then use the {jobname} field in the "Rename files during ingest" field….

Never had a problem…  until I updated my PhotoCart site to the latest build, and it's broken the SQL syntax…

I've discovered it's because some of the files have apostrophes in them - e.g.: "Daniel_O'Donnell", "60's Festival" etc.

Is there any way of still using apostrophe's in the Jobname field, but that when it's detected in file/rename functions it strips invalid characters? (or rather, specific characters rather than invalid ones)? 
My whole workflow relies on the {Jobname} field so I don't want to lose the ability to use ' in that..  but just don't want them in my filenames.. 

You could put {jobname} in some unused IPTC field, and then use Find and Replace on that field to remove the undesired characters, followed by a rename of the files using the variable that corresponds to the field you used, followed by an application of the IPTC Stationery Pad to clear out the temporary field.

A lot of steps, I know.  But I couldn't come up with anything better at this time.

-Kirk