4

Some sub-folders from my iTunes music folder have been deleted from my hard drive, but are still present into my iTunes library (with a "!" sign next to it, showing me that there is a problem with that song). I have a lot of those unplayable songs on my library... Is there a way to rid of all those songs ?

7
  • 2
    possible duplicate of superuser.com/questions/130633/…
    – Shevek
    Commented May 9, 2010 at 20:32
  • 1
    @Shevek: it sounds like exactly the opposite problem. will the solution to that also work for this? Commented May 9, 2010 at 20:43
  • oops, yes, it is the opposite problem... sorry! didn't read it fully. My bad.
    – Shevek
    Commented May 9, 2010 at 20:49
  • MacOS or Windows?
    – Shevek
    Commented May 9, 2010 at 21:31
  • @Shevek: I made the exact same mistake after reading your comment voted you up, then read @quack quixote's comments and realized he's right. LOL.
    – Josh
    Commented May 9, 2010 at 23:05

5 Answers 5

2

Scott Hanselman blogged a C# solution about this last week.

If you are handy with C# then its another good solution.

Source code is provided so if you have C# Express or Visual Studio then you should be good to go.

3
  • No need to compile or program, since the binaries are provided with the download.
    – Daniel Beck
    Commented Jan 26, 2011 at 14:31
  • @Daniel - Ah! I didn't look in the bin directory. Good spot
    – Shevek
    Commented Jan 26, 2011 at 15:09
  • That's why I commented on the question. Let's see if it gets you an accept.
    – Daniel Beck
    Commented Jan 26, 2011 at 15:10
1

Found this but it is dated 2004 so it may not work if the iTunes API has changed in between

You will need to have Windows Scripting Host installed.

http://ottodestruct.com/itunes/RemoveDeadTracks.txt

Save this file as RemoveDeadTracks.js

Launch iTunes

Double click on RemoveDeadTracks.js

Wait!

It will display a message box when done.

1
  • I did this about 6 months ago, so the APIs are likely still good.
    – BillN
    Commented Jul 7, 2010 at 21:16
1

Pardon my ignorance, but can you not just delete them from the library by right-clicking on them and choosing "Delete"?

2
  • 2
    not when there are hundreds or even thousands of them!
    – Shevek
    Commented Jul 8, 2010 at 7:32
  • What if you just deleted the entire library from iTunes and then re-imported the folder that contains all your music? That's a sure-fire way to make sure you only have the right stuff in there.
    – jrc03c
    Commented Jul 8, 2010 at 13:09
1

I won't go into how absolutely ridiculous it is that there are people actually writing scripts and apps and selling them to fix this problem which should be a BASIC function of iTunes... but i suppose iTunes is getting a cut, so why should they fix it?...

So here is my sledgehammer approach (recommended if you have done major moving/conversion of files in library):

  1. Make sure iTunes (application) is not open
  2. Go to your iTunes directory (usually ...\My Music\iTunes)
  3. Select: "iTunes Library Extras.itdb" + "iTunes Library Genius.itdb" + "iTunes Library.itl" + "iTunes Music Library.xml"
  4. Move these to a temporary location (i.e. a folder on your desktop)
  5. Go back to the iTunes folder and open up the 'Previous iTunes Libraries' folder and delete everything inside.
  6. Open the iTunes application - you will have nothing in there because you've moved the index.
  7. Go to File>Add Folder to Library... then select the root directory of your music library.

iTunes will now rebuild your library (might take a while), and therefore not have any dead paths mixed in.

You will need to get all your album artwork again (File>Library>Get Album Artwork) and it may take multiple attempts to get it all back again as it is a little temperamental...

If you're happy with your new library, you can go and delete the original library index files you moved at step 3. If you wanted to restore your old index, just move them back again.

0

If you can sort the column (where the "!" symbol is displayed), then that'd be great, since you can just highlight from the very first track, down to the last (use SHIFT key to do this), and hit DELETE.

1
  • 1
    Sadly, that column is not sortable, which is obnoxious.
    – Nathan
    Commented Oct 4, 2011 at 1:52

You must log in to answer this question.

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