Oct 06, '04 09:10:00AM • Contributed by: Anonymous
#!/bin/sh
files=`grep 'Location' /Users/admin/Desktop/Library.xml | \
sed 's/<key>Location<\/key><string>//g'| sed 's/<\/string>//g' \
| sed 's/%20/ /g' | sort`;
old_IFS=$IFS
# IFS by default is space tab return, and stands for
# Internal Field Separator.
IFS='
'
for i in $files
do
`echo $i >> /Users/admin/Desktop/Library.txt`;
done
IFS=$old_IFS
[robg adds: I tested this, and it worked by simply copying and pasting the above code. I'm not positive this handled the "space tab return" bit properly, but I get one line per entry in my library, so it worked well enough for me. The end result is a text file showing the full path to every file in your library. To make the above script work, you'll need to change the admin entry to your admin user's name. You'll also have to copy and rename your iTunes Library file to the desktop and rename it to Library.xml (or the script could be changed to read the original file).]
