Correct iTunes File structure

I have seriously messed up mu itunes files. Between moving the libraries between HDD's and copying and pasting songs, I have created a big big mess. All the files are there - but I need to know what the correct file structure is.. .> itunes>music>media. etc etc. thanks

imac, Mac OS X (10.6.6)

Posted on Feb 2, 2011 5:27 AM

Reply
23 replies

Jun 19, 2014 9:29 AM in response to turingtest2

I know this is an old thread, but hopefully someone can help. Due to some stupid mistakes (involving trying to clean up my itunes library on the folder level and some NAS backup issues), my itunes folder structure on my mac mini is completely messed up. All the songs are still on my mac mini, as I can find them in Spotlight. But only about 1,000 (out of around 10,000) songs appear when I launch itunes.


The problem is that most of the songs are buried about 2-4 levels too deep in a folders. I would prefer not to start moving folders around and deleting items, as I fear I might really lose something.


I was wondering/hoping if there is an easy fix. Should I try consolidating the library? Should I just create a whole new library and then start from there?


Again, all the songs are in my computer. Unfortunately, I do not have a time machine backup of the folder structure before it got screwed up.


Also, I have both an "itunes Music" and an "itunes Media" folder.


Many thanks for any suggestions!

Jun 19, 2014 9:39 AM in response to rsc1969

Start a whole new library. If only a fraction of your songs are appearing in iTunes then iTunes won't know what to do with the ones it doesn't know exist or cannot find. Sorry about the jumbled links below but the new forum software has made a mess of displaying my reference links.


What are the iTunes library files? - http://support.apple.com/kb/HT1660 More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html Where are my iTunes files located? - http://support.apple.com/kb/ht1391 iTunes 9 [and later]: Understanding iTunes Media Organization - http://support.apple.com/kb/ht3847 Image of folder structure and explanation of different iTunes versions (turingtest2 post) - https://discussions.apple.com/thread/2741246?answerId=13025536022#13025536022 and https://discussions.apple.com/thread/3700206?answerId=17457605022#17457605022

Jul 16, 2014 1:06 PM in response to rsc1969

Sorry to be so late replying... I've had two lost attempts at replying to this thread. Third time lucky I hope.


Adding the content that isn't in the library is easy enough. File > Add Folder to Library will take care of that, although best to check your options for Keep... & Copy... and the current media folder before you start. File > Library > Organize Library > Consolidate files will bring in whatever is outside the media folder and turning Keep... off and then back on again should tidy up any inconsistencies inside it.


Once you have a library that has all your media and all playlists you can consolidate the media to a new path if needed. Ideally the working library would be at <some path>\iTunes\iTunes Library.itl and the media consolidated to the folder <some path>\iTunes\iTunes Media, as this is the layout which makes it simple to move the whole library as a unit from <some path>\iTunes to <another path>\iTunes without breaking the connections between the library database and the media.


See Make a split library portable for a more recent update of my split library advice.


tt2

Feb 2, 2011 5:40 AM in response to mountainbike2001

Here are typical layouts for the iTunes folders:

User uploaded file


If you have upgraded from version 8 (or earlier) to iTunes 9 (or later) at some point, then your media folder (everything inside the red outline) may still be called *iTunes Music* instead of *iTunes Media*. The extra Music folder inside the media folder is used if you have allowed iTunes to *Upgrade to iTunes Media Organization* (iTunes 9) or used *File > Library > Organize Library > Reorganize files in the folder "iTunes Media"* (iTunes 10). Depending on your choices for *Keep iTunes Media folder organized* and *Copy files to iTunes Media folder when adding to library* plus a little bug in which one build changed the name of the file storing the choice of layout it is quite easy for some of your files to be organized according to one layout and some the other.

Since iTunes 9.2 if you try to Get Info for a file that is missing in action and click Cancel when asked to try to locate the file you should get a dialog that shows where iTunes is looking for the file. If you push files back to where iTunes expects to find them then when you restart iTunes it will be able to find them again. If that sound like too much work, and you're not bothered about your ratings & playcounts then simply start over.

tt2

Feb 2, 2011 7:47 AM in response to mountainbike2001

OK.... Macs are not my specialty but I'm pretty sure I understand how iTunes manages files. Some concrete examples might help understanding. Where do the files go that "move back out"? And where were they before iTunes moved them? The typical location for music tracks on a Mac is <Profile>/Music/iTunes/iTunes Media/Music/<Artist>/<Album>/## <Name>.<Ext>. Where are yours?

tt2

Jan 3, 2013 10:34 AM in response to turingtest2

Has the folder structure changed for iTunes 11.0.1?


I changed the "iTunes Media Folder Location"

Preferences | Advanced | "iTunes Media Folder Location" | Change button

checked "Keep iTunes Media folder organized"

checked "Copy files to iTunes Media folder when adding to libraries"


The new "iTunes Media Folder Location " was

E:\iTunesNew\

When I look at E:\iTunesNew\, there is no folder called

E:\iTunesNew\iTunes Media

When I add a music folder to the library, it places it at

E:\iTunesNew\Music\Celine Dion\ A New Day Has Come

instead of at

E:\iTunesNew\ iTunes Media\Music\Celine Dion\ A New Day Has Come


Does iTunes 11.0.1 no longer create a "iTunes Media" folder?


Thanks in advance.

Jan 3, 2013 11:14 AM in response to John2398

In the normal course of events the library folder is at <Some Path>\iTunes and the media folder at <Some Path>\iTunes\iTunes Media. When you manually edit the path for the media folder you're telling iTunes where to place new media, not moving the library files, nor telling it where to find files you've moved by hand. You're explictily defining the media folder, not the folder above it, so your example looks correct to me.


tt2

Jan 3, 2013 12:39 PM in response to turingtest2

Thanks for the detailed explanation.


From your explanation, it appears that the "library folder" does not have to contain the "media folder" since "You're explictily defining the media folder, not the folder above it."


How do you find the current location of the library folder?

How do you change the location of the library folder "<Some Path>\iTunes" to another location?


Thanks in advance.

Jan 3, 2013 1:21 PM in response to John2398

Hold down shift as you start iTunes. Keep holding until asked to choose or create a library. If iTunes opens normally close and try again. If you want to make a new library click create and browse to the folder you want to create the library in. It should create a libray with the name given and build an iTunes Media folder inside that for the media. Once you have more than one library you'll need to hold down shift as you start iTunes to change from one to another.


tt2

Jun 19, 2014 10:00 AM in response to Limnos

Thanks. Just a few follow-up questions:


1) In order to make a new library, should I create something like a folder called "iTunes 2" and place it on the same level as my current "iTunes" folder, which now contains all the messed up sub folder structure?


2) If so, how do I go about getting the music (i do NOT care about ratings and play counts. I DO really want to preserve all my playlists and groupings) into the new library?


3) I assume once #1 and #2 are completed, I can delete the old "itunes" folder, correct?


Thanks again!

Jun 19, 2014 10:10 AM in response to rsc1969

Do the playlists have all the songs that you want in them? Do those tracks all play? Adding the content that isn't in the library is easy enough. File > Add Folder to Library will take care of that, although best to check your options for Keep... & Copy... and the current media folder before you start. File > Library > Organize Library > Consolidate files will bring in whatever is outside the media folder and turning Keep... off and then back on again should tidy up any inconsistencies inside it.


tt2

Jun 19, 2014 11:11 AM in response to rsc1969

Start with some more details.


What is the location of the media folder under iTunes > Preferences > Advanced?

What are the settings for Keep... & Copy... on the same tab?

Do you know the path to your active library file?

Normally it would be <User>/Music/iTunes/iTunes Library.itl but you can choose a different one, and sometimes people get connected to one inside ../iTunes/Previous iTunes Libraries after a crash.


tt2

Jun 20, 2014 9:14 AM in response to turingtest2

thanks. I created a new library and had the computer scan for music. all my music was imported. the playlists were not. But, I found the old library that has the playlists and I am exporting them and then importing them into the new library. The old library is several layers down in the folder structure, so I don't want to mess moving it. Once I have all the playlists imported to the new library, I will delete the old one.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Correct iTunes File structure

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