Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Tagging with an iterative loop e.g. tag automatically according to folder order (Read 671 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Tagging with an iterative loop e.g. tag automatically according to folder order

Is there any way to create an iterative loop for tagging? Specifically, I want to be able to create a playlist, set the discnumber tag to 1 for the first folder, 2 for the second, and so on.

I'm trying to sort out a large collection and was using Facets. I realised I could save a load of time if, when I've got albums sorted by folder path, if I could somehow transfer the index of the folders into discnumbers. I have lots of multi-disc albums without discnumber tags, but where the individual CDs are in subfolders in the correct order. I basically want to drop a multi-disc album on a playlist, and tag it so that all files in the first folder get tagged 1, the next folder +1, the next +1 and so on.

Is this even possible?

Re: Tagging with an iterative loop e.g. tag automatically according to folder order

Reply #1
I know Mp3Tag offers something similar - although I'm not sure it'd reset the disc number across albums - but assuming you have the directories named sensibly e.g. CD01/Disc 01, couldn't you just use something like:
Code: [Select]
$substr($directory(%path%,1),3,4)

Re: Tagging with an iterative loop e.g. tag automatically according to folder order

Reply #2
Assuming, your layout looks something like this: ...\Artist - Album\CD 2\9 - Title.ext

You can extract the disc number for all tracks of all albums (just pull them into a playlist) by

1. opening the Properties dialog
2. select Tools > Automatically Fill Values
3. select Source "Other...", to the right enter $directory(%path%,1) (which extracts the name of the parent directory, e.g. "CD 2", from the full file path)
4. in line Pattern, enter CD %discnumber%
5. verify the preview, Ok; Done.

Re: Tagging with an iterative loop e.g. tag automatically according to folder order

Reply #3
I know Mp3Tag offers something similar - although I'm not sure it'd reset the disc number across albums - but assuming you have the directories named sensibly e.g. CD01/Disc 01, couldn't you just use something like:
Code: [Select]
$substr($directory(%path%,1),3,4)
Assuming, your layout looks something like this: ...\Artist - Album\CD 2\9 - Title.ext

You can extract the disc number for all tracks of all albums (just pull them into a playlist) by

1. opening the Properties dialog
2. select Tools > Automatically Fill Values
3. select Source "Other...", to the right enter $directory(%path%,1) (which extracts the name of the parent directory, e.g. "CD 2", from the full file path)
4. in line Pattern, enter CD %discnumber%
5. verify the preview, Ok; Done.

Thanks, but I've got thousands of folders without a consistent structure, so parsing strings would be laborious.

Also, I'm wanting to edit the album tags as I go (to removed 'CD 1'-type suffixes and make the album tags identical, so manual tagging would be quicker than parsing.

Really, I'd want something that works in a similar way to the 'Auto track number' function, but for Discnumbers.

 

Re: Tagging with an iterative loop e.g. tag automatically according to folder order

Reply #4
Thanks, but I've got thousands of folders without a consistent structure, so parsing strings would be laborious.

Also, I'm wanting to edit the album tags as I go (to removed 'CD 1'-type suffixes and make the album tags identical, so manual tagging would be quicker than parsing.

Really, I'd want something that works in a similar way to the 'Auto track number' function, but for Discnumbers.
You could do it with foo_sqlite, but if you're just doing one album at a time it's probably just as easy to do it with Masstagger scripts and keyboard shortcuts e.g. one script to set discnumber to 1 (Ctrl+1), one to set discnumber to 2 (Ctrl+2) e.t.c., and do it from the playlist window.

I don't use the Properties panel for editing but given there's an 'Auto track number' I'm surprised there's not an equivalent for discnumber.

Re: Tagging with an iterative loop e.g. tag automatically according to folder order

Reply #5
I want to avoid doing it one disc at a time if possible as I'll be doing other editing as albums (consolidating the Album tags and removing the 'CD1'-type suffixes), because some sets contain quite a lot of CDs (with volumes containing sub-volumes), and because the scope for errors will be greater.

I've never used foo_sqlite or Masstagger, but I'll look into them. Even if it's not the solution I'm looking for, perhaps I'll find a better way once I work them out.
Thanks, but I've got thousands of folders without a consistent structure, so parsing strings would be laborious.

Also, I'm wanting to edit the album tags as I go (to removed 'CD 1'-type suffixes and make the album tags identical, so manual tagging would be quicker than parsing.

Really, I'd want something that works in a similar way to the 'Auto track number' function, but for Discnumbers.
You could do it with foo_sqlite, but if you're just doing one album at a time it's probably just as easy to do it with Masstagger scripts and keyboard shortcuts e.g. one script to set discnumber to 1 (Ctrl+1), one to set discnumber to 2 (Ctrl+2) e.t.c., and do it from the playlist window.

I don't use the Properties panel for editing but given there's an 'Auto track number' I'm surprised there's not an equivalent for discnumber.