applescript – File Renaming – Currently Using Bridge Regex // String Substitution // Automator
I have been trying to solve this issue for awhile now – and I am able to get it down to two steps but wondering if it can be done in one step via automator / applescript or javascript / python?
Thanks in advance. Examples attached;
Filename examples; files always follow this format but the digital counter is always random.
—
1234567890123_000 ExampleNameRandom1.jpg
1234567890123_000 ExampleNameRandom2.jpg
1234567890123_000 ExampleNameRandom3.jpg
—
1234567890125_002 ExampleNameRandom4.jpg
1234567890125_002 ExampleNameRandom5.jpg
1234567890125_002 ExampleNameRandom6.jpg
—
1234567890135_005 ExampleNameRandom7.jpg
1234567890135_005 ExampleNameRandom8.jpg
1234567890135_005 ExampleNameRandom9.jpg
1234567890135_005 ExampleNameRandom10.jpg
Output; desired output to be in this sequence – not a + b + c + d + e instead b + d + e…etc
1234567890123_000_b.jpg
1234567890123_000_d.jpg
1234567890123_000_e.jpg
—
1234567890125_002_b.jpg
1234567890125_002_d.jpg
1234567890125_002_e.jpg
—
1234567890135_005_b.jpg
1234567890135_005_d.jpg
1234567890135_005_e.jpg
1234567890135_005_f.jpg
—
I have been doing this using Bridge and using a Regex to extract the first 17 digits (1234567890123_000) – after I do this the files get the multiple file tags of (1) (2) (3) so I use an automator name replace to replace those with b d e f, etc in the folder they go to. Is there any way to do what I am doing now but consolidating it to a applescript/javascript I can run on bridge or an automator that I can run on finder or set as a folder action?
Not sure if its relevant but basically these are batches of images and they get renamed as b for captureone metadata – rating 1 star, d for rating 2 star, e for rating 3 star, etc. that’s how I determine how to name them before I run the batch rename on bride, I just filter by rating so this bit is manual which I don’t mind. I mean if there is a way to include that as well would be grand.
Read more here: Source link