Welcome Guest

Pages: 1 2
Creating a named folder inside the folder the tracks are in.
SnowdogPostMay 30, 2023, 18:26
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicCreating a named folder inside the folder the tracks are in.

Inside each album folder, I like to have the tracks, a cover image & a folder called "Scans, etc." into which I put all the other imagery & any other stuff that comes along.

I wonder if it's possible to select a load of tracks (probably a box set) & tell Yate to create a new sub-folder inside each of the folders where the selected tracks reside?

Can I have the option to name that folder?

2MR2PostMay 30, 2023, 19:53
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicCreating a named folder inside the folder the tracks are in.

Yate does not have the ability to create a folder (unless it calls out to a script). However, Yate automatically creates folders when it writes files. The action writes a dummy.txt file to each created folder and then deletes the file.

Download the action at: https://2manyrobots.com/actions/Create-Subfolder.zip

The screenshot of the panel describes how it works.

Image

SnowdogPostMay 31, 2023, 03:05
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicCreating a named folder inside the folder the tracks are in.

That's fantastic! Some of these things seem like magic to me.

So, as a supplementary (& before I go ahead & do this manually for a 100 disc set) is it possible to ask Yate to move files into that sub-folder?

The situation is that I now have files called back.jpg, folder.jpg & Front.jpg sitting loose in each folder.

I can re-name Front to Cover in the finder. Is it possible to tell Yate to move the others (one at a time, by telling it the name of the file to move) into the new "Scans, etc." folder for each album?

----

Actually, I can think of another action to make my requests even more complicated. Is it possible to re-name "Cover.jpg' to "Bernstein_000_Cover.jpg" where 000 is the disc number taken from Yate?

Or perhaps to re-name "Cover.jpg' to "Bernstein_000_Cover.jpg" & then have a separate action to change 000 to the disc number in each case?

2MR2PostMay 31, 2023, 07:18
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicCreating a named folder inside the folder the tracks are in.

...so the real issue is that you have a bunch of jpg files in folders with audio files that you want moved into a subfolder 🙂

1) do you want all image files moved or do you want to keep folder.jpg in the original folder. That's what folder.jpg is for. Up to you
2) front.jpg gets renamed to some pattern_DDD_Cover.jpg where some pattern is supplied by you and DDD is the disc number of the audio files in the folder. Is this correct?

Why not do the whole thing (including subfolder creation) in a single action? If the subfolder already exists it will not mess things up. If there are no image file (which might not be possible), do you still want to create the subfolder?

Big picture and details 🙂

SnowdogPostMay 31, 2023, 08:40
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicCreating a named folder inside the folder the tracks are in.

Okay, so the reason I didn't want it all as one action is that, in future, specifics may vary, at which point, a single action would become obsolete. That was my thinking, at least. I might be wrong. I often am.

Below is a screen shot of the current state of play.

There are 100 folders...

In each folder, there are three image files & (now) a "Scans, etc." folder..

I would like to move the "back" & "folder" JPGs into the subfolder...
(It occurs to me that the advantage of having an action that allows me to specify the name of an image & do them one at a time is that, in future, if the images are called something else, I can still use this action. If every folder has a PDF in it or a folder called "artwork" or whatever, I could still move those into the "Scans, etc." folder in one go, rather than manually.)

[It's my understanding that the "folder" image is used by PCs to make the folder into a picture, or put a picture on the folder or something. Macs don't do that by default - although you can do it - & I've come to want my folders to look like folders in any case, so I just stick the "folder" images away in the sub-folder.]

With regard to the Cover image, I'm not sure of the bast way to make this work. Here's my thinking:

I could use the Mac's rename function to rename my cover image to something like "Bernstein_000_Cover" & then use an action to use the disc numbers to replace the 000 (in exactly the same way as I do within Yate, when I number the albums 000 & then replace with the disc numbers).

If that can all be done in one action then fab! It's just that I'm trying to build in the fact that, in a different life the images might be called "Front" or might be PNGs or some such so the more open & customisable the action is the better.

Obviously we can't make it good for every eventuality, but I'm just wondering what is the best way to keep it open & flexible so that, the next time I get a box set & there's a consistency between all the folders that would allow an action, this one would still work.

I'm hoping that's enough information, but feel free to come back with any question or, seeing as you can see how this might work, any thoughts or suggestions.

Image

2MR2PostMay 31, 2023, 10:22
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicCreating a named folder inside the folder the tracks are in.

Ok, move all jpg, pdf and an Artwork folder ... if any into the subfolder. Handle the rename of Front.jpg in a way that you can choose the 'new name' and then append the disc number.

I think I have it. ....

2MR2PostMay 31, 2023, 12:14
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicCreating a named folder inside the folder the tracks are in.

Download https://2manyrobots.com/actions/Move-Non-Audio-Files-to-Subfolder.zip

The zip will contain another copy of the Create Folder action ... because that's how exports work. You can delete the older copy ... which is identical to the new one.

The two actions work together as Move Non Audio Files to Subfolder uses the identified subfolder established by the Create Folder action.

You will be prompted for a pattern. The action moves jpg, png, pdf files and an artwork folder. front.jpg will be renamed as requested.

SnowdogPostJune 1, 2023, 06:53
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicCreating a named folder inside the folder the tracks are in.

Okay, so it did the first disc but none of the others.

I then made the mistake of renaming all of the "Front" images to "Cover", thinking that this is what it was after but then, when I looked again, your action is looking for images called "Front".

I can rename them back again, of course, but it does highlight one issue which is that every box set I might need this action for may have the files names slightly differently. It's the reason I thought that a "move the files called X into the sub-folder" action means that I could run it several times to capture all eventualities.

Also, the renamed file needs to stay out of the sub-folder, so that the music software can see it & use it as the cover. 🙂

However, if it's deemed to be a better solution to have all the various procedures in one action, I'm wondering how this could be achieved

2MR2PostJune 1, 2023, 07:29
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Hot topicCreating a named folder inside the folder the tracks are in.

The image you sent had back, folder and front. I assumed that front was 'the file'.

I can see the bug where processing stops after one folder/disc. My head is on v6.16 and I had to back port the action to the current release. Some of the switching of which files are active is much easier in v6.16.

I was moving the renamed file. I can leave it in the original folder ... I guess your player reads any jpg.

Detail time again. All artwork files get moved into the subfolder except ' ' which gets renamed and stays in the original folder. Fill in the blanks. I can look for cover or front and if both are present the action can prioritize ... up to you. 'cover' or 'front' or any one of with a priority?????

Just to be clear ... you will have no artwork files in the root folder except the one named 'pattern_DDDD_Cover.jpg'.

If I'm missing anything let me know,

SnowdogPostJune 1, 2023, 07:33
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Hot topicCreating a named folder inside the folder the tracks are in.

The image you sent had back, folder and front. I assumed that front was 'the file'

You're quite right. In this case it was. But it might not be, hence my thoughts about a less specific action. 🙂

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