I recently ripped a whole bunch of wav files using iTunes and made the mistake of importing them into the iTunes library of a second computer. iTunes did not recognize the songs and wasn’t able to index them, so I made the brilliantly stupid mistake of letting iTunes manage my library, thinking that the index might be refreshed, but what happened instead was iTunes moved all the songs into a sub-directory named, “Unknown Album” in a directory named, “Unknown Artist.” Now I can’t identify artists or albums, only song titles. This has to do with wavs not having this information embedded. I’ve still got the original library file on the first computer, so I can manually link to each file, but at this point, I’ve ripped 851 songs and would like to find a way to do a mass reorganization of these files into appropriate album/artist directories. I believe embedding ID3 tags into the files, would facilitate this, but I’m not aware of an exiting method of accomplishing this. Any ideas?
Error #1: Using WAV file format. While there are valid arguments for ripping to WAV files instead of AAC or MP3, I can think of no good reason not to use AIFF instead of WAV. WAV is a file format, not a music format. WAV can consist of AIFF streams, PCM audio streams, or other raw data streams. If you are going to save music files, saving them in an appropriate music oriented format is wise.
Error #2: Unless you happen to have an unlimited supply of disk space or a tiny music collection, using AIFF or WAV files is wasteful. If you must use a loss-less encoding format, use ALE (which reduces file sizes by about half). If you’re obsessive and absolutely must have your files in a “standard” loss-less format, then use AIFF, the same format your files are already encoded in on the CD-ROM.
When you factor in the excellent sound quality achieved by even 128 bit AAC, using anything less space efficient than 160kbit AAC VBR gains you nothing in terms of audio quality. Lest you assume that I speak from ignorance, it’ll help to know that I play my music collection directly from AAC encoded files on my G5. The G5 is connected to the receiver via a Toslink (fiber-optic) cable. Speakers are reference grade Ascend Acoustics CBM-170. They have no detectable color (amazing!) and we use them for studio monitors when I’m playing Sound Engineer. When all filters (EQ, etc) are disabled, there is no discernable difference between my AAC files and the CD deck.
Caveat: The only purpose I can imagine for using a loss-less format is to remove the need to re-rip your CDs in the future. When a newer audio format arrives that you want to re-encode to, you simply insert your DVDs of lossless encoded music and use the iTunes -> Advanced -> Convert to ___ feature. This would be less laborious than re-ripping all your CDs. iTunes will encode the songs into your format of choice and replace the previous version of the song in your library. This has the added advantage of preserving all your iTunes metadata, such as listen count, song rating, etc.
Caveat Notes: Even if you proceed this way, you will still want to encode all your files to AAC or MP3. That’s the format you’ll use everywhere. Why? You want your song library to fit on your laptop hard drive, iPod, car MP3 player, etc. Using a compressed format with embedded ID tags such as MP3 or AAC will also prevent the problem that you are facing right now.
Now, what can be done about the existing situation?
The original iTunes library file (~/Music/iTunes/iTunes Library) file still exists on computer A. Since the file hierarchy is completely lost, it’s time for one of two options:
#1 – start over. Discard everything and re-rip. Follow my advise above.
#2 – all the info needed to sort out the files is embedded in the iTunes Library file, as well as the .xml file that iTunes creates. Write a perl script that parses through the file. Back the file up first! The Library file will have paths that look like this:
Music/Library/iTunes/iTunes Music/Nickelback/The Long Road/Someday.wav
The existing paths to the files looks like this:
Music/Library/iTunes/iTunes Music/Unknown Artist/Unknown Album/Someday.wav
The logic for the perl script will look something like this:
for each file in Unknown Artist/Unknown Album
check for matching song name in iTunes Library
if there’s only one match
create the artist and album directory
move the file to the appropriate directory
That simple script will correctly identify and move 99% of the files in about 3 seconds. There will be a few songs with duplicate names that will need to manually moved. It’s faster to manually move them than to program the logic to fix them automatically.
I’d write an example script but I have two books to read and a greek exam to study for. This is enough to put you on the right track.