Thursday, January 05, 2006

iTunes Lost Libraries

My wife is a music fan and uses iTunes (yes now that there are ways to buy music online we have stopped being big bad "pirates", Aaargg! Lets retire and drink rum matey!).

Unfortunetly there are still major shortfalls in the online music purchase world. I for one would like to see a central clearing house type system that allows me to buy music from anyone, play it on all devices, and be able to re-download lost music...

Which gets me to the problem at hand. Windows XP seems to be really bad at losing files if your computer crashes (well we can't have everything, at least it doesn't crash too often anymore). Problem is, all to often it seems to be the iTunes library xml files. That really sucks if you spend a lot of time getting playlists just right as most iPod owners will do.

So I eventually decided that an easy backup solution was needed. Of course I really should have a full backup solution for everything, but hey, who does. I do it every so often to make sure we have copies of our purchased music, and not too much else changes very regularly.

Anyway here it is. Basically it makes a copy of your iTunes metadata (library lists, playlists play count, ratings etc) and deletes older backups. It's an old school batch file and you should run it using task scheduler, its up to you to choose to schedule it daily or weekly (don't go to monthly as the script deletes anything at least a month old, so you might end up with one copy of an already corrupted file).

How to use:

1. open a dos prompt (Start > Run > Open "cmd") and check your date syntax (date /t). If the result is Day DD/MM/YYYY then downlad this file. If your syntax is American (Day MM/DD/YYYY) then download this file. You will need to unzip them to the .bat file, use Winzip if you don't already have something.
2. copy the batch file from step 1 into your iTunes directory (usually Documents and Settings/My Music/iTunes or something like that)
3. edit the file if you want your backup to go anywhere else but a "backup" directory in that same location.
4. Setup your Task Scheduler (Start > Control Panel > Scheduled Tasks > add scheduled task). First browse for the file you copied to your iTunes area and make it the "program you want to run". The selec a time to run when your computer is most likely to be on, and at the period you would like (daily or weekly?).
5. You are done.

The backups will be in the backup/yyyy/mm/dd directory. The first time the script runs in any particular month, the second to previous month will be deleted (ie "more than a month ago"), at the beginning of Feb the previous year will be deleted.

There's More
While I am complaining about iTunes matters. iTunes doesn't seem to be able to regenerate the library list too well either. If I import from directory and give it my whole Itunes directory it misses half the files. Whats up with that Apple? (I know, I know, "buy a mac").

3 Comments:

Anonymous Anonymous said...

Thank you VERY much :) this script is exactly what I need :)) muchas gracias

TomekĀ¤
Fuerteventura/Islas Canarias

10:14 AM  
Anonymous Anonymous said...

Thanks very much

6:22 AM  
Anonymous Anonymous said...

Thank you so much! That will be usefull!

5:39 PM  

Post a Comment

<< Home