Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Copying JUST mp3 files

I wanted to copy just the mp3 files from my iTunes to a backup folder.
First I made a list of all mp3 files, including the full path, in a text file.
Then I went through that file, deleting any files I didn't want backed up.
Then I used rsync to make the backup.

I went through this process to ensure that I only backed up the files I wanted backed up, and no others.

Substitute your paths and file names as appropriate...this was done in the bash shell.

find [[yourpath]]/iTunes\ Music -name "*.mp3" -print >> [[yourpath]]/mp3List.txt

rsync -avu --files-from=[[yourpath]]/mp3List.txt [[yourpath]]/iTunes/iTunes\ Music [[yourbackuppath]]/mp3_files

Make iTunes arrows point to your own music, not the iTS

defaults write com.apple.iTunes invertStoreLinks -bool YES


This makes those little right-pointing arrows in iTunes point to your library, not the iTunes Store. If you want the iTunes Store, Option-click instead.