The downside with WAV files as a media format is that they don't retain tag information. AIFF files however ought to contain a tag which can hold details such as track number, name, artist & album even if some more esoteric fields aren't preserved.
If iTunes wasn't managing your file & folder names when whatever "accident" happened then most of the important information could have been recovered from the paths, but if I read you right the tracks are no longer connected to iTunes and have also been jumbled up in the Unknown Artist\Unknown Album folder. You can't undo that loss of data. The tools that could identify the tracks from their audio fingerprints, such as MusicBrainz Picard, won't work since they can't write the information to a non-existent tag.
Offhand I don't think there is any easy way back from the mess....
@ turingtest2: Thanks.
I am thinking since it is possible to manually rebuild the jumbled songs (through 'locate and search') back into the appropriate itunes Artist/ Album folder, there should be a way to automate the manual process.
I just need a written code that can search the songs in the Unknown Artist/ Album and match the songs with the itunes Library database (which I believe are still intact) and restore it for me (instead of me doing it manually). At least I rebuilt one album manually....and I think rebuilding one album wouldnt have been possible if required tags or metadata info necessary are lost.
The logic needed (which is subject refining) is:
Pick a song in the Unkown Artist/ Unknown Album folder,
Get the song's information (i.e. name of song, size in MB, length of play, date modified, song format ie. .wav or .aiff);
Match the information with that in the itunes database (size, length of play, song format, album name, artist name);
return the matched song to the corresponding Artist/ album to a specified location/directory
That is pretty much what I did manually.
I am not looking for a tool that will use any database (or tags) outside what is residing on my computer. I need someone who can put my logic into a code. And if there is something that i have not put into consideration for my logic to work, I like someone to enlighten me e.g if iTunes had protected its Library database from being searched with a written code.
If my logic can work and the itunes database can be searched, I want to believe someone somewhere must have written and use such a code. And if not someone can write it. Programmers, where are you?
Programmers, where are you?
Well I'm here. I was about to say that I still wasn't optimistic but as long as the files are in a ## <Name> format that gives us a fighting chance. The number of occassions when a given combination of track number and track name appears on more than one album isn't that high, but it certainly happens. Thankfully I've just discovered that I I can read the size of the missing file from the database, even if I can't read the last known location, so chances are that there is something I can do after all. I shall need to think about it a bit...
Any chance you could scan through your Unknown Artist\Unknown Album folder looking for duplicates and throw some examples back at me. Filenames that are almost the same as another but end with " 1.<ext>", " 2.<ext>" etc. I'm just testing out a modification of my existing FindTracks script which makes it look for missing tracks in the Unknown Artist\Unknown Album folder as well as the usual locations. There's some fuzzy matching logic that needs fine tuning and it might help to see some real world examples.
Hmm, 20,000 songs in the one folder yes? I'll definately need to change the way the script looks for matches. Currently it processes every file name in the folder generating a fuzzy matching pattern. The overhead for testing a dozen files in the same folder isn't that great but 20,000 would be prohibitive.
Thanks for your time.
Have you tried to rebuild (ie. play) any song having exclamation ! mark against it? Give it a try. That's if you have not deleted the Unknown Artist/Unknown album folder. You will be able to play the rebuilt song but will still have the directory as Letter:/Unknown Artist/Unknown Album/Songname.wav. The fact that it can be played suggests it can be rebuilt into its Artist/Album folder which is still showing on the itunes GUI (hence in the itunes library database)
How to play the song:
Click on the song having ! mark
It will ask if you want to locate the song. Click yes.
Locate the folder form Computer/User/... Music/Unknown...
Search for the song by its name (a few letters may be enough).
Hover over the song to ensure it has same size (kB or MB) and track lenght with that itunes GUI.
Double click on the song. The ! marks dissappears and it will start playing.
Note that using 'Get Info' shows that the song is now located on Letter:/Unknown Artist/Unknown/Songname.wav folder
The song is lost again when you close itunes.
I dont think duplicate song (e.g love1.wav and love2.aiff) can pose much problem. RINSE and TUNEUP trial version program have given logic on how to eliminate duplicates.
Note: if you hover on some songs in the Unknown folder there can be a difference of 0.01 sec in track length of same song in the iTunes GUI.
Itunes organised RULE is a combination of :
iTunes/iTunes Media/Music/Artist Name/Album Name/songs
Itunes/Itunes Media/Music/Compilations/Album/songs.. (for Album that has more than one ARTISTS)
The LOST song destination is:
Itunes/iTunes Media/Music/UNKNOWN ARTIST/ UNKNOWN ALBUM/songs (same applies for Compilation albums)
The song is not actually lost. It is simply not organised into the rule which itunes will naturally play.
If the tracks are obviously duplicates of the same song in both the iTunes GUI and the folder that isn't so much of a problem. I was thinking more of this scenario:
Where what should be three potentially different takes of the same song also have the same track number on their respective albums. As a result, following a similar accident to yours, they would be called "04 Ziggy Stardust.wav", "04 Ziggy Stardust 2.wav" & "04 Ziggy Stardust 3.wav". Using the size to confim the identity is easy enough to do by eye and I could implement that in my script at some point, but I'm thinking I need to turn off the fuzzy pattern matching system that could test for there being more than one potential match in the same folder as with 20,000 files it would run too slowly. Instead I've tweaked the script so that only look for a single precise match in the Unknown Artist\Unknown Album folder for the sake of efficiency.
The result of running the revised script on the selection above would be that all three tracks would be connected to the same file (if iTunes doesn't move them after they have been reconnected) or they might be connected in the wrong order. Just in case, use the Find Duplicates tool first, put the library in name order, and manually relink any same track name & number occurrences. Also take a backup copy of your iTunes Library.itl file before you proceed any further.
I've done tweaking and testing the new build of FindTracks which should now be able to sort things out for you. I strongly recommend you disable the option to "Keep iTunes Media folder organized" for now. You can re-enable it once the script has done its work so that iTunes can reorganize the files back in their proper folders, then disable it again to avoid a similar problem in future. I have a script called ConsolidateByMoving that you can use on selected items instead. I also suggest you take a look at my User Tip on backing up.
Select a few broken tracks for the first pass, say no to the first prompt, confirm the media folder then check each "correction" before it happens. If that's good try a larger batch on automatic. Still good? Set the rest in motion and give it some time.
The Script worked (it processed and summarised what was done and time taken) but the objective of getting the songs back in the approriate path ...Itunes/itunes Media/ Music/Artist/Album/song... has not been met. When I checked the location of a song that has been linked, it is still in the path Itunes/itunes Media/ Music/Unknown Artist/ Unknown Album/song. Rebuilding songs should link and build. I like to see the songs built back in the Album folder (and Album in Artist folder); and if various Artists are involved, the songs back in the Album folder (and Album folder in Compilations folder). Was the Script designed to do that? Perhaps its just impossible for so and so reason. Thanks.