Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to delete duplicates in media folder

I'm trying to delete duplicates that I may have accidentally created by manually combining to custom media folders I made a while back while backing up and moving the library to a new computer.


Here is what I mean:

http://imgur.com/RXU6Hrd


As you can see, there is only one copy of the file in the iTunes application but two physical files in the media folder, one of which is not being used.


I was going to just move the media folder and re-consolidate so that I make a new media folder with only one copy of each file (as a side note, I only consolidate songs that have a 4* rating or higher because iTunes seems to run slower if you have too many files). However, when I try to change the media folder, all the files become missing until I change the media folder location back to where it previously was (where all the duplicates are).


I could have sworn there was a way to copy the iTunes media folder through iTunes so that it only copies the files being used by iTunes but I cannot remember how. Any help is greatly appreciated!


Thanks.

Windows 7

Posted on Oct 13, 2015 12:46 PM

Reply
6 replies

Oct 13, 2015 1:48 PM in response to teebanger

Here is what you need to do to get your iTunes Media folder to only have what is in iTunes. Please back up your computer just in case something goes missing.


Locate you iTunes Media Folder

Locate and organize your iTunes media files - Apple Support


Before doing the steps below, make sure "Keep iTunes Media Folder Organized" is checked in iTunes > Preferences > Advanced

To answer your concern about the files going missing, iTunes should follow the folder even if you move it as long as the above box is checked. At least that's how mine works. Example: My iTunes Media folder is in Users/(myname)/Music/iTunes/iTunes Media. If i move the iTunes Media folder to the desktop, iTunes shows the media folder on Users/(myname)/Desktop/iTunes Media until I reset the iTunes Media folder outlined below.

Also, this will consolidate ALL of your music. I'm not sure how you only consolidated 4 stars or above.


  1. Drag your iTunes Media folder to the desktop (don't delete it yet)
  2. Rename the folder on your desktop to something other than iTunes Media
  3. To recreate the iTunes Media folder, go to iTunes > Preferences > Advanced > Reset

    Click yes if it asks to keep your organization, etc...

  4. Now click File > Library > Organize Library > Consolidate > Ok
  5. This should put copies of EVERYTHING in iTunes into the new iTunes Media folder you just created
    1. Note that this will duplicate files and take up extra space until the original folder is deleted
    2. This creates a new folder named Music in the iTunes Media folder that should contain all of your music currently in iTunes
  6. Make sure everything plays before deleting the folder on the desktop


That should resolved this concern, otherwise, you can manually go through the iTunes Media folder and delete the duplicates that have the (1) next to them

Oct 13, 2015 1:55 PM in response to teebanger

I don't think the process given above is going to help. Moving the media folder breaks iTunes connection to the files, which it then cannot consolidate, or play! 😮


I'd advise you add the iTunes Media folder to the library, so that iTunes is connected to all files, then dedupe as set out below. Given all the duplicates will have been added today sorting exact duplicates on date added will allow you to easily select and delete the duplicates, which you should send to the recycle bin.


Apple's official advice on duplicates is here : Find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls such as lost ratings and playlist membership, or that sometimes the same file can be represented by multiple entries in the library and that deleting one and recycling the file will break any others.


Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created. If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.


Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background, this post for detailed instructions, and please take note of the warning to backup your library before deduping.

(If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed.)


The most recent version of the script can tidy dead links as long as there is at least one live duplicate to merge stats and playlist membership to, and should cope sensibly when the same file has been added via multiple paths.


As for not consolidating all of your media I suggest a quick skim through Make a split library portable. A portable library is much easier to move, backup or restore. Having iTunes connected to files located outside of the media folder rather than inside won't have a positive effect on performance.


tt2

Oct 13, 2015 1:52 PM in response to teebanger

Note that I edited my original post.


When I move the iTunes Media folder, iTunes follows it. Maybe I have a newer version?


By the way, I tested all of the above steps on my own computer before posting it so I know it works, but I am using a Mac. iTunes for Windows may behave differently.


For example, when I move the iTunes Media folder to the desktop, iTunes > Preferences > Advanced shows the media folder on Users/(myname)/Desktop/iTunes Media


Maybe this isn't the case for Windows 7

Oct 13, 2015 4:08 PM in response to Pmintz25

Your step 1 and the fact that Windows doesn't respond quite the same way to moved files is what causes the problems. A valid approach would be to consolidate to, for example, C:\Media, delete the original now redundant iTunes Media folder, then reset the media folder back to ..\iTunes\iTunes Media and consolidate back to it. However this means copying and deleting every item in the library twice, only to end up with most things back where they started. Adding the media folder to the library and then deleting the recent additions is a more efficient strategy.


As an aside Apple's article on moving the media is correct as written, but you'll find seasoned users prefer to move the library as a unit rather than consolidating media to a new folder because of the issues that arise later when you want to move the library to a new system.


Please don't be discouraged by my feedback on your post, this place can always use new people willing to help and none of us can start out knowing everything, particularly about a platform we don't use. Kind people have pointed out errors in my assumptions about OS X in the past. 🙂


tt2

how to delete duplicates in media folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.