Welcome Guest

Pages: 1
Rename Template Help
mdy8893PostFebruary 27, 2023, 11:43
Newbie
Posts: 21
Registered:
July 26, 2019, 11:26
Normal topicRename Template Help

Hi there,

I'm trying to build a folder rename template that checks for multi-disc albums.

Multi-disc: Album > Disc X > Track
Single disc: Album > Track

I've attached the template I've built so far. Works great on multi-disc items, but skips single discs.

Any ideas where I'm going wrong?

Many thanks.
Image

2MR2PostFebruary 27, 2023, 12:53
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicRename Template Help

It's a little tricky because you can't have if - else - endif tokens which span(Folder Start) tokens.

I've attached a screenshot of a working solution.

The flow is as follows:

The (Track Pad 2) (Title) tokens work on the last path component. ie. the filename.

The (Folder Start) token moves the working component to the folder which contains the tracks. After this you test for multi-disc and either do the album or disc metadata.

The next (Folder Start) token moves the working component to the folder which contains the folder containing the tracks. If the tracks are multi-disc you rename it to Album. Otherwise you rename it to (Current Folder) which effectively does nothing. When renaming and there are no changes, the file system is not touched.

This only works if all the required path components exist. Rename does not create path components ... it only renames existing ones. The Move action statement can rename, move and create folders all at once.

Image

mdy8893PostFebruary 28, 2023, 12:13
Newbie
Posts: 21
Registered:
July 26, 2019, 11:26
Normal topicRename Template Help

Works flawlessly! Many thanks for your help!

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