Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I just did a batch rename in Finder (using AppleScript), however the filenames in iTunes remain unchanged.

I tried restarting iTunes and that did not help.

I also tried iTunes >>> File >>> Library >>> Organize Library, but it happens to be grayed out, as I had already recently done this (prior to renaming the said files).

Any clue how to get these files renamed in Finder to show up in iTunes without manually doing so? It's too large a number to do manually.

Many thanks

share|improve this question
1  
iTunes uses the ID3 tag of the song, not the file name. Changing the file name breaks the iTunes music library database. You will first have to fix your database by rebidding it. –  cksum Jan 13 '12 at 19:31

4 Answers 4

up vote 2 down vote accepted

Unfortunately, updating the files in Finder will not update the files in iTunes. This is because iTunes uses a file called iTunes Library.itl as a database of all your media.

You can however use the automator actions "Get Specified iTunes Items" and "Set Info of iTunes Songs" to automat the process of updating the metadata. There are some other good Automator actions in there too.

share|improve this answer

What's worse is that by doing this, iTunes has no idea where the renamed files went. The key to any iTunes-related file management is to do it within iTunes itself. If you choose File -> Library -> Organize, then "consolidate" the library, you will see a large number of exclamation marks next to the renamed files. If you don't re-attach iTunes with them, it will not be able to play those files, sync them, etc.

The simplest solution would likely be to restore from backup (or otherwise undo the batch change) then re-write your AppleScript to talk to iTunes instead of Finder.

share|improve this answer

You will need to clear all the songs in your library then drag the media library folder into iTunes,

This will reset all the files into iTunes as by renaming the source files you would have broken the links between the software and the music file.

share|improve this answer
    
comments with downvotes? –  Graeme Hutchison Jan 14 '12 at 0:10
1  
I wasn't the down-voter, but I'll give you a good reason: if you re-import files, iTunes does not care one lick what the files are named. It runs from the metadata stored in the file, and takes precedence. Removing the library and re-importing will make sure iTunes knows where all files are, but it will not fix the "wrong name" situation the asker was trying to solve. –  Christian L Jan 14 '12 at 4:29
    
Thanks, The OP will have to do what I have suggested, otherwise iTunes will not be able to find the files, as he has changed the file names. I have edited the bit about information. –  Graeme Hutchison Jan 14 '12 at 7:54

When ID3 are missing, it would be very easy for iTunes to read the file name and use that as its track name in ID3 but if there is no ID3 tags on a file it was obviously not purchased from any music store so as far as Apple is concerned it is not a file worth caring about...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.