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: File operations- how to handle duplicate foldernames (Read 1114 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

File operations- how to handle duplicate foldernames


I’m using file operations to move lots of files into a standard file hierarchy of the format %artist% / %album% reading the metadata from .cue files. Occasionally, there are duplicate copies of the album in the source folder hierarchy, and as the metadata is the same, the second copy or move fails because the folder already exists. Is there anyway to handle this?

One idea is to generate unique %album% folder names, but I can’t see a function for that. Another idea would be to handle the error… Note that I’m using foobar as it will read the metadata from the cue file in the folder. The meta data isn’t anywhere else. Are there other rename tools that can read from a cue file?

Thanks
Dpr

Re: File operations- how to handle duplicate foldernames

Reply #1
The following assumes that you ultimately want a better solution that _1, _2 e.t.c.

I use '%albumartist%/%date% - %album%' which eliminates most of my "duplicate" albums.

Where duplicates still exist I create a tag to differenciate them that I then use in the naming format, so the my actual naming format for all albums becomes '%albumartist%/%date% - %album% (<<tag differentiator>>)'.

I don't know the scale of your problem, but you can use foo_sqlite to identify the duplicates. So, you could create a playlist of all the files that don't have this problem and process them as you are now, then address the rest manually.

Re: File operations- how to handle duplicate foldernames

Reply #2
reading the metadata from .cue files.

.cue files ... are they CD rips? It so, use the CDDB disc ID or the AccurateRip ID. CUETools can scan the whole thing and populate a tag.

The CDDB id is usually enough, but I got some albums in different masters where you get a conflict. I even have an album that was remastered ten years later but where track lengths did not change by as much as a sample.

Re: File operations- how to handle duplicate foldernames

Reply #3
The following assumes that you ultimately want a better solution that _1, _2 e.t.c.

That would be enough… how would you implement that?



 

Re: File operations- how to handle duplicate foldernames

Reply #6
The following assumes that you ultimately want a better solution that _1, _2 e.t.c.

That would be enough… how would you implement that?
Given you've just said that they're real duplicates (multiple rips of the same CD) then I'd dedupe them and process them afterwards.

I'm in between PCs right now so I don't have everything set up just yet, maybe tomorrow, but if I had to do what you're after I'd create a new tag for the duplicates (internal to foobar) using foo_sqlite, then use that tag in the file operation to separate the duplicate rips.

I will have a go at this because it's not something I've done before but I don't know when it'll be. You could always ask on the foo_sqlite forum if it's something you're considering.

Re: File operations- how to handle duplicate foldernames

Reply #7
I've noticed that %discnumber% is not being set by foobar, so this is causing problems for multi-cd albums. I am using this filename pattern:

Code: [Select]
%album artist%/['['%date%'] - ' ]%album%/[%discnumber%]/%filename%

discnumber is set in the cue file (and totaldiscs) but neither are set in the properties. (see attached screenshot).
Any ideas why?

Thanks for any insights.