Hi
I've been struggling for some time on how to change the names of thousands of images to fit a new format for a client.
I have several thousand photos with the filename in this format:
YYYY#.Code$.Description$.n.Source$.jpg - eg 1950s.E333.Arrival.1.Times.jpg, or 1950c.E333.Arrival.1.Times.jpg, or 1950.E333.Arrival.1.Times.jpg.
New format:
YYYY#_Source$.jpg (note the '_'), with a maximum of 21 characters, tracking the old filename in one of the metadata fields.
This is how I've done it:
1. Using IPTC Stationary Pad, I saved the file name base to the 'Caption Writer' (or wherever) field, using the Variable {fbas}.
[Kirk, is there a way of adding Photo Mechanic custom fields such as 'Old Filename' to the IPTC data? For example, iView Media has custom fields].
2. I then used Edit>Find and Replace, to replace '.' with '_' in the 'Caption Writers' field.
3. I sorted the files into different folders by the Source$ (eg 'NIS-Sun', or 'Times', for example). This meant I could control the number of characters for the substring extraction.
4. Next, I renamed the file name from the Caption Writer field using the Variable {cwrt} in Rename Photos.
5. Reopening Rename Photos, I entered the following substring to extract 'YYYY_Source$.jpg' (or 'YYYY#_Source$.jpg').
{fbas:0,4}_{fbas:-n} - for YYYY, where 'n' is the number of characters from the end. For 'Times' it would be {fbas:-6}, (5 characters for 'Times' and one extra for the '_').
(or {fbas:0,5}_{fbas:-n} - for YYYY#)
It has the desired outcome. Perhaps there is a way to do all this with an AppleScript? Well, if you (Kirk and others) know about this, do feel free to advise me.
Thanks.