I recently moved my iTunes music library onto a new computer set-up by copying the "iTunes Media" folder onto an external HD and then onto my local disk. When I opened iTunes for the first time, it loaded the cover art for all of my iTunes-purchased content but it displayed the cloud icons for all my music, indicating that it was available to stream but not available offline, and it did not display the music I've imported from CD's at all.

I assumed that my transfer didn't work, so I started downloading my high-priority purchased content again. Well, yesterday I actually went into my "iTunes Media" and "Music" folders, and all of the audio files are there. The high-priority content that I've downloaded again has all duplicated, and the content exists but is not duplicated.

Now I want to clear the duplicate files. I also want to either display the imported and the low priority purchased content in my iTunes library or delete it from my local disk (haven't decided which yet). I'm guessing that some or all of this can be automated with Applescript or Automator, but I've never used either of those before and I need some help. Which tasks can I automate, and what's the best way to learn these utilities if I've done some programming before?

  • The best way to learn AppleScript is to look at the scripts that Apple provides in the "/Library/Scripts/" directory. Open the applications and scripts in Script Editor to get a look at the code. Most if not all of what you'd need to write this is somewhere in those scripts. AppleScript is one of the few languages that basically teaches itself, so you should be able to pick it up in no time. Dec 12, 2015 at 3:53

3 Answers 3


Doug's AppleScripts for iTunes have helped me a great deal. Try Dupin for cleaning those duplicate files. There's also a lite version.

You can learn a lot about AppleScript by opening scripts by others in script editor so you understand what's happening. Apple also has a comprehensive guide about the language, if you want to read all about it.


iTunes menu->View->Show duplicate items


Thanks for weighing in folks.

Tweaked around with Applescript, but at the end of the day I was going to spend more time futzing with it than it would take to manually organize the files to my standards. And, while Dupin looked promising, it it wasn't worth paying for an app to outsource such a simple job.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .