I have some iTunes music files that are all capitalized letters and others that are normal small case letters. Instead of me going through and renaming each capitalized music file’s data is there a way that I could make iTunes default all music files and their data to small caps? …a way in Terminal or through and the iTunes Music Library.xml file, or…?

I have swapped out the iTunes Music Library.xml file and the iTunes Library.itl file with new fresh files from an unused iTunes from another computer, but when I reinstall music files back into the Music folder it goes right back to being capitalized letters even though I had changed those large caps to small caps earlier.

I prefer not to rename 100’s of music files so I’m hoping there is a simpler way of doing this via some forced code somewhere. Any suggestions?


You asked specifically about defaulting all music files and their data to small caps. I think you mean "title case," like this:

This Is Title Case

Assuming that is what you want, and considering that you mention you already have some files that are all caps and others that are all lower case, perhaps you will get the result you want by changing the names-- automatically-- inside of iTunes. Not quite "on the way in" but easily and quickly afterward.

iTunes is very AppleScript-able and it can solve your problem. Here is a script that I wrote to do it. Note that it operates on whichever tracks are selected. I was using iTunes to test, with "My Music" clicked at the top and "Songs" clicked in the sidebar to the left. I select multiple tracks and then ran this script in the Script Editor:

-- Uses the satimage osax
-- Get it at http://www.satimage.fr/software/en/downloads/downloads_companion_osaxen.html

tell application "iTunes"
    set the_tracks to the selection
    repeat with a_track in the_tracks
        set the_old_name to name of a_track as string
        set the_new_name to titlecase the_old_name
        set the name of a_track to the_new_name
    end repeat
end tell

Very important: you must install the Satimage OSAX as indicated in the script. Plain vanilla AppleScript does not do "titlecase" out of the box. There are ways to do it but the Satimage OSAX is the fastest and easiest.

I wrote the script to be self-explanatory and it could be sped up a little. Still, this should do the job for you. I applied the script to 100 tracks and it finished in less than three seconds. You might try it on just a couple of badly-formatted titles to see it work before selecting a large number of tracks. Test the script and be sure it does what you want before making wholesale changes to your iTunes library.

Yes you would have to run the script again if you imported more songs. But, you could make a Smart Playlist based on Date Added and run the script once a month or so on whatever new tracks you'd imported (and they would be in that Smart Playlist).

AppleScript can "get" and "set" a lot of information for an iTunes track. Title, Album, etc. Here is what you get when you run this script (with some track or tracks selected in iTunes):

tell application "iTunes"
    set the_tracks to the selection
    set my_track to item 1 of the_tracks
    set x to properties of my_track
end tell

{class:file track, id:32579, index:23, name:"Agnus Dei", persistent ID:"23958CCD4BBB2A10", database ID:11459, date added:date "Wednesday, March 16, 2011 at 10:01:56 AM", time:"6:06", duration:366.471008300781, artist:"John Rutter", album artist:"", composer:"", album:"Requiem", genre:"misc", bit rate:128, sample rate:44100, track count:0, track number:5, disc count:0, disc number:0, size:5864189, volume adjustment:0, year:0, comment:"", EQ:"", kind:"MPEG audio file", media kind:music, video kind:none, modification date:date "Thursday, June 16, 2016 at 8:28:57 AM", enabled:true, start:0.0, finish:366.471008300781, played count:0, skipped count:0, compilation:false, rating:0, bpm:0, grouping:"", bookmarkable:false, bookmark:0.0, shufflable:true, lyrics:"", category:"", description:"", show:"", season number:0, episode ID:"", episode number:0, unplayed:true, sort name:"", sort album:"", sort artist:"", sort composer:"", sort album artist:"", sort show:"", loved:false, album loved:false, cloud status:matched, location:alias "CB SSD:Users:cboyce:Music:iTunes:iTunes Music:John Rutter:Requiem:05 Agnus Dei 1.mp3"}

You can see Name, Artist, Album Artist, Album, Comment, etc. Lots of info that you could get, change the case, and set.

  • thanks Christian, I should have mentioned that I'm using OSX 10.6.8 Snow Leopard with iTunes 10.7 which is important information. Would this script work for these older OSX and iTunes that I'm using? – Guzaking Jun 16 '16 at 10:11
  • Christian...reading up on your link page, I'm not looking to change inputted iTunes fields to "sentence case": all lowercase with the initial letter uppercase, for example "L'effet que tu me fais" I'm looking to change "L'EFFET QUE TU ME FAIS" to "L'effet Que Tu Me Fais" is this still possible for OSX 10.6.8 and iTunes 10.7? Also will it work with text in all fields under the tabs - Info | Video | Sorting where a user inputs the relevant data? – Guzaking Jun 16 '16 at 10:26
  • Satimage's "titlecase" command would give the same result whether the input was all lower case or all upper case or a mix. It capitalizes the first letter of each word and makes the rest of the letters lowercase. I don't have a Mac with 10.6.8 and iTunes 10.7 on it to test but iTunes historically has been very AppleScript-able, and I suspect your version will respond as the current one does. It would cost you nothing to try my script so I'd try it. – Christian Boyce Jun 16 '16 at 15:22
  • ok, I'm going to give it a go...but do you know if it would also change the text in all fields under the tabs - Info | Video | Sorting where a user inputs the relevant data per music file? not just the song title or artist name but everything else like album, grouping, composer, comments, etc.? – Guzaking Jun 16 '16 at 19:05
  • The script would have to be changed in order to affect the text in other fields. See the last two paragraphs of my answer-- you can access the text in many fields. If you need help let us know. – Christian Boyce Jun 17 '16 at 7:13

TunesMedic can do that plus a lot of other useful organization tasks in iTunes, its five dollars on the app store if my memory serves me right and in my opinion totally worth it as I don't have time for some of the repetitive tasks to keep everything organized

these two pages are all the things it can do and its really simple click and you're done

  • thank you Taylor, but I should have mentioned that I'm using OSX 10.6.8 Snow Leopard with iTunes 10.7 which is important information. I don't think this works with what I'm using though? I have been poking around and found 3rd party programs called renamers but none that are compatible with OSX 10.6.8. There is one Rename 1.7.0 that does work for regular folders and files but not for iTunes. And I'm looking to change all inputted data fields in iTunes. iBatch seems to be a very good program for this but I don't think they have a version for Snow Leopard. – Guzaking Jun 16 '16 at 10:12
  • TunesMedic's purpose is to delete duplicate song files which is not what I'm looking for though. I'm looking for a renamer program to drop uppercases to lowercases and TunesMedic from what I'm reading doesn't do this, not only that I'm reading many bad reviews that it deletes alot of wanted song files that are non-duplicates from other users iTunes. – Guzaking Jun 16 '16 at 10:24

You must log in to answer this question.

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