In the event that you accidentally delete your music from your computer, it is possible to recover your songs from your iPod. Note that Terminal and Windows tips do not work on the iPod Touch or iPhone.
Using the Terminal
The iPod songs are hidden away on your iPod in an invisible folder, ie one that the Finder won't display normally. It is possible to let the Finder display hidden files as outlined in this guide or with 3rd Party Software. Otherwise you can follow the below instructions.
All songs are stored in this location:
In this folder are a number of folders usually labelled from F00 to F49 or higher. The songs are actually stored in these folders with obscure names that are usually not relevant to the song.
To copy these songs using the Terminal, follow these steps:
Launch Terminal which is located at /Applications/Utilities/Terminal
Type in (replacing [YouriPodName] with the name of your iPod)
cd /Volumes/[YouriPodName]/iPod_Control/iTunesTo copy the music to your Desktop, type in
cp Music ~/DesktopOnce the copy has completed, drag the Music folder on your Desktop onto the iTunes icon on the Dock or in Finder
Wait while iTunes imports all the songs
N.B. This method does not recover your playlists, ratings or play count.
On Windows it is easier to view hidden files. Follow the following steps.
Load the Start Menu
Choose Control Panel
Enable Classic Mode (if not already enabled)
Choose Folder Options
Select the View Tab
Under the Hidden files and folders section select the radio button labeled Show hidden files and folders.
Press Apply and then OK, then close the control panel.
Recovering files from an erased iPod on Windows
It is possible to restore files from an erased or partially corrupted iPod (either Mac or PC format) using a windows tool. The iPod must mount as a disk for this technique to work, and it is nearly impossible to get all of the files. It is certainly possible to get some of them, though. The tool TestDisk 6.8 is very good for this.
You will need a copy of the free program PhotoRec from Christophe Grenier's Security Site and enough free disk space to hold the files from the iPod. I tried a lot of programs to do this, and this one restored the majority of the songs from an iPod nano. No other free undelete tool could do this. Here's how to do it:
Extract the PhotoRec zip archive (do not extract it to the iPod)
Plug the iPod in, and wait for the drive to appear in "My Computer". If it does not appear, Right-click on "My Computer" and go to "Manage". In the Computer Management Console that appears, select the "Disk management" option which is under "Storage". There should be an option for the iPod in the lower pane. It may say that the partitions on the iPod are "Corrupted", "Unknown" or "Unhealthy". This is fine.
Launch "photorec_win.exe" from the "win" folder of PhotoRec
Select any option you fancy for logging. No Log is fine if you don't want one.
On the next screen, select the disk which matches your iPod. It should be the same size as your iPod.
If there is an option for "Drive X:" (where X is any letter), choose this, as it will only try and recover your music
If you choose the physical disk option "Disk /dev/sdbX" (where X is a number), recovery should still work, but will also recover bits of your iPod firmware. Nike+iPod has lots of samples in it.
Now, choose the partition table type. If you had a mac formatted iPod, choose Mac, if it was a Windows iPod, choose Windows
If you don't recover any songs at the end of the process, try this again with the "None" option.
Press enter, and press enter again to begin a "search" on the next screen
Select the correct format for the iPod on the next screen. Choose "Other" here.
Choose a directory (NOT ON THE IPOD) to store the recovered files.
Leave PhotoRec to recover your music, notes and photos from the iPod
Please note that it will give all m4a/m4p files the extension .mov or .mp4 - you will need to rename them to use them in iTunes.
Quote [Originally Posted by MacRumors]