Welcome Guest

Pages: 1 2
Changing non-audio file names.
SnowdogPostJuly 10, 2024, 19:07
Pro
Posts: 300
Registered:
March 15, 2022, 17:12
Hot topicChanging non-audio file names.

Bit of a long shot, this one. Primarily because I'm wondering if I can use Yate for a non-music related problem. Not that I think it's particularly complicated in that I've used Yate to change image names, etc. but... Well, let's see.

I have a digital camera & I can use Adobe Bridge to export the photographs from the camera to my computer.

Unfortunately, Bridge seems to have quite a limited range of options in its Photo Importer interface, to the extent that I can get the basic information more or less how I want it, but then I have to do multiple "find & replace" type actions, to perfect the file names.

So, I start off with a file name like this:

20240710102744IMG_1510.crt

And I want it to end up like this:

2024-07-10 10.27.44 - IMG_1510.crt

(In case it's not obvious, the first part is the year, month & day (hyphenated). Then follows the time in hour, minutes & seconds (separated by full points). Finally, after a "space hyphen space", there's the original image name which is assigned by the camera & which I'd like to keep "as is". (I often shoot in bursts where all the photos happen in the same second & it's only the unique image number that's different.)

Assuming the starting format was always the same, so that the hyphens etc. would always be inserted into the same places, would it be possible to create an action where I can select a folder with a ton of files in with the same name format in it, run the action & have the action add the two hyphens, the space, the two full points & the "space hyphen space" into the appropriate places, given that every time one is added, the character count for where the next one is increases?

Here's a screenshot showing part of a list of photos:

Image

2MR2PostJuly 10, 2024, 20:20
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Hot topicChanging non-audio file names.

I use Yate actions all the time to do things on my Mac that have nothing to do with audio files. For example, link validation in the help files is done by an action. I clear the web site's cache via an action. etc., etc., etc.

I've written an action named Rename Photos. You do not have to have any files loaded to run it.

You wrote that the filename extension was crt however the screenshot shows cr2 which are Canon raw files. I've used cr2. If you want to change the extension, modify statement 4 in the action. Do not include a leading period with the extension. If you'd rather that I prompt for the extension, let me know.

Download the action at:

https://2manyrobots.com/actions/Rename-Photos.zip

SnowdogPostJuly 11, 2024, 06:27
Pro
Posts: 300
Registered:
March 15, 2022, 17:12
Hot topicChanging non-audio file names.

I suspect the cr2 to crt was an autocorrect I didn't spot. (In fact it tried to change it to cut just then!)

Thanks so much, I'll check it out now.

SnowdogPostJuly 11, 2024, 08:46
Pro
Posts: 300
Registered:
March 15, 2022, 17:12
Hot topicChanging non-audio file names.

Okay, well that works a treat! Thank you.

SnowdogPostJuly 17, 2024, 05:31
Pro
Posts: 300
Registered:
March 15, 2022, 17:12
Hot topicChanging non-audio file names.

So, this Action seems to have developed a fault (which usually means I'm doing something stupid).

I've got Yate onto a second machine successfully & I'm pretty sure I've used this Action a couple of times without issue. (Of course, now I'm starting to doubt myself on that!)

However, this morning, I exported a disc full of photos from the camera & they came in with the usual file name. I ran the action & it seems to have changed the day on all the files to the 7th.

I exported the images a second time, assuming I did something wrong & got the same result.

At the third time of asking, I duplicated the folder of photos (A & B in the screenshot) & ran the action again.

As you can see from the first screenshot, with A (the raw import) at the top & B (the actioned images) below it, the highlighted image has kept the correct time stamp but the date has been changed to the 7th on all the images. (They actually run from the 11th to the 17th.)

The second screenshot is from Bridge where you can see the file name does not correspond to the date stamp in the metadata below it.

Any thoughts?
Image
Image

SnowdogPostJuly 17, 2024, 05:32
Pro
Posts: 300
Registered:
March 15, 2022, 17:12
Hot topicChanging non-audio file names.

It's possible that I haven't used the action on the second machine before now & it occurs to me that you may need operating system details & version numbers, but I'll await your response.

2MR2PostJuly 17, 2024, 07:18
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Hot topicChanging non-audio file names.

Oops. Evidently I like months so much that I decided to get rid of the days 🙂

In the image each $ sequence represents a regexp match. I entered $2 twice using $1-$2-$2 as opposed to $1-$2-$3 on line 15

https://2manyrobots.com/actions/Rename-Photos2.zip

Sorry 🙁

Image

2MR2PostJuly 17, 2024, 10:32
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Hot topicChanging non-audio file names.

The Droplet implementation has been enhanced in the upcoming v6.21.

I've created a version of the action which will work as a droplet on your desktop. You can simply drop folders or .cr2 files to the droplet.

SnowdogPostJuly 18, 2024, 05:01
Pro
Posts: 300
Registered:
March 15, 2022, 17:12
Hot topicChanging non-audio file names.

Oh, cool! Thanks, I'll get that installed.

SnowdogPostJuly 18, 2024, 07:08
Pro
Posts: 300
Registered:
March 15, 2022, 17:12
Hot topicChanging non-audio file names.

That seems to work perfectly, thanks!

Now to do some detective work & see if used the action earlier & didn't notice the problem.

Pages: 1 2
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.034 seconds.