Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Copy artists/albums from iPod to computer System
I recently filled up my 10 gig iPod with ripped music from my CD collection. Because my hard drive only has three gigs available, I deleted them off my hard drive after copying the music to my iPod. After I was done with this entire process, I decided I wanted to back all the files up to Data CD so I wouldn't have to rip them in the future. Then I smacked myself in the head when I realized I couldn't easily copy the music from the iPod to iTunes.

Previous hints detail how to get to the raw music files in a mounted iPod, but I wanted to make sure I copied whole albums at once. Since my available HD space was less than that being used on iPod, I couldn't copy the entire store, and since Apple used hashed folders to store music on the iPod and albums could be split into multiple folders, I couldn't just copy a hash folder at a time. Read the rest of the hint for the solution to this problem.

[robg adds: Based on the comments posted when this was an "Is it a hint?" entry, here are two things to note: The posted script requires the non-free ksh shell; one commenter noted that a previous hint explains how to use the zsh to emulate ksh. Also, another commented noted the iPod Tracks -> Desktop script from faqintosh.com.]

My solution was to write a perl program to parse the iPod's music database which references all the track's pertinent information with the files' location on the iPod. The program is here:

http://www.jetmore.net/john/code/parse-ipod-db

Using this script, I was able to build a unix pipeline to do whatever I wanted with the data files. In my case I copied Artists whose names started w/ the same character to a folder called "music" on my desktop using the following shell script:

#!/bin/ksh
for i in `parse-ipod-db "/Volumes/John's iPod" |\
  grep -i "^C" |\
  awk -F'\t' '{ print $4 }' |\
  tr " " ":"`
do
  FILE=`echo $i | tr ":" " "`
  echo $FILE
  cp "$FILE" ~/Desktop/music
done
This runs parse-ipod-db on the iPod mounted on "/Volumes/John's iPod". From this output it grabs all tracks by artists whose names start w/ "C". Then it strips the output so it only contains the location of the data file for that track. The it temporarily replaces all space characters in the file name w/ colon characters (This is a hack - there might be a better fix, but I was in a hurry and this works - the colons get removed later). At this point we have a list of all the data files we want to copy. for each of these files, change the colons back to spaces, echo the file, and then copy it to the folder "music" on your desktop (which it assumes already exists).

Using this I was able to copy over whole albums to my harddrive and back them up to data CDs, which was the whole point. Maybe this will be useful to some other people, too.

Disclaimers:
  • This is not widely tested software - it works well on my machine, which is OS X 10.2.6, iTunes 4.0, old style iPod running 1.3 software - any other setup may have a different DB format and may not produce meaningful output.
  • Apple seems to use 2-byte chars in their file names, artists names, etc. My program blatantly ignores the high byte since I don't easily know how to deal w/ it and I didn't need it. This script may not work w/ non-english characters and will almost certainly not work for asian languages.
  • That said, this script only reads from the database, it doesn't write to it, so if it doesn't work, you'll just get a bunch of errors, it _shouldn't_ break your iPod - but I offer no warranty =).
    •    
  • Currently 2.50 / 5
  You rated: 1 / 5 (4 votes cast)
 
[14,884 views]  

Copy artists/albums from iPod to computer | 4 comments | Create New Account
Click here to return to the 'Copy artists/albums from iPod to computer' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Copy artists/albums from iPod to computer
Authored by: gancho on Aug 25, '03 11:12:18AM
With reference to the script's use of ksh, it doesn't look like you would need to use ksh over any other shell for this particular script. You could use the default tcsh.

The script isn't doing anything ksh-specific.

[ Reply to This | # ]

Copy artists/albums from iPod to computer
Authored by: dogboy on Aug 25, '03 01:16:33PM

Could you not just drag the folders on the ipod when it is in firewire disk mode straight onto the cd and burn it?



[ Reply to This | # ]
Copy artists/albums from iPod to computer
Authored by: ygor on Aug 25, '03 01:29:11PM

With CD-R media available at pennies a disc, why don't folks off-load their music onto CD's ?

The music is easily re-loaded into your iPod directly from the CD and you do not have to worry about clogging your hard drive.



[ Reply to This | # ]
Copy artists/albums from iPod to computer
Authored by: silicondiode on Aug 25, '03 05:18:29PM
the best way - bar none - to get your music back from your iPod is Podworks. $8 US but SO worth it.

http://www.scifihifi.com/podworks/

there is none higher. and it's blazingly fast. most apps of this type are dog s l o w....

it'll even put the songs in artist / album folders for you. and then there's the added bonus of portability...

http://www.scifihifi.com/podworks/faq.html#portability

---
-silicondiode
BeOS Refugee

[ Reply to This | # ]