Welcome Guest

Pages: 1
Prepending folder name to image file
SnowdogPostMay 13, 2025, 08:14
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicPrepending folder name to image file

Hi there.

I have a 111 disc box set.

Each folder contains an image file called "Cover.jpg"

I'd like each image file to have a unique name based on the disc numbers & the easiest way to do that in this case is to prepend the folder name to the cover image, joined by an underscore.

Can I do this "out of the box"? I can see how to prepend the folder name using "set" but I can't see a way of telling it to affect the image file.

(I do have an action for adding the disc number to an image file but in this case I'm not using disc numbers because the 111 discs come in two sets, 1 & 2 so the disc numbers revert back to 1 at the beginning of box 2 & that caused some problems with Roon.)

Here's a screenshot of what I'm on about. Does the question make sense?

Image

2MR2PostMay 13, 2025, 11:07
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicPrepending folder name to image file

There is no UI method to rename images. It has to be done by an action

Download the action at: https://2manyrobots.com/actions/Folder-Name-to-Cover.zip

Load up the files and run the action named: Folder Name to Cover.jpg

SnowdogPostMay 13, 2025, 11:12
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicPrepending folder name to image file

Amazing, thanks!

SnowdogPostMay 14, 2025, 08:21
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicPrepending folder name to image file

I seem to be having a bit of an issue with this whereby it's prepending the same number to each of the image files & not the unique folder.

(It actually did this the first time I used it & I didn't even notice as, in that instance, the disc number was a bit buried amongst some other numbers.)

Curiously, where it used number 1 in the first instance, this time it's using number 2.

Image

2MR2PostMay 14, 2025, 08:29
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicPrepending folder name to image file

It's not doing anything with the disc number. It's prepending the name of the containing folder followed by an underscore.

SnowdogPostMay 14, 2025, 08:51
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicPrepending folder name to image file

Yes, but each containing folder contains the disc number and, as you can see from the screen shot, it's prepending number 2 onto number 5 where it should be taking each unique folder & prepending it to the image "Cover.jpg" contained within.

Apologies if this is something I'm doing wrong.

2MR2PostMay 14, 2025, 09:42
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicPrepending folder name to image file

Hmmm....I'll have a look when I'm back in front of a Mac in a few hours. May be a bug in the Move Non Audio statement.

If it'll help I can change it to look for files which end in Cover.jpg so you don't have to do any repairs

2MR2PostMay 14, 2025, 09:46
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicPrepending folder name to image file

My bad. I should read my own documentation. Escape sequences are only done once. I can't do all the files at one. It must be done per folder.

I'll fix it using any file which ends in cover.jpg. no need to fix anything.

SnowdogPostMay 14, 2025, 10:09
Pro
Posts: 361
Registered:
March 15, 2022, 17:12
Normal topicPrepending folder name to image file

Thanks!

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