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

My iTunes is using both old and new folder structures...

I'm on 10.7 of iTunes now on a MacMini mid-2011 + a MacBook Pro mid-2009. I turn on Home Sharing to access one iTunes' content from the other, and both are authorized to the same Apple ID for the iTunes store.


I've been using iTunes since it was first released and have a fair amount of old data.


I have the content stored on an external HD for the Mac Mini. It is defined in the iTunes > Preferences > Advanced tab as "/Volumes/<HD Name>/iTunes".


Keep iTunes Media folder organized and Copy files to iTunes Media folder when adding to library are both checked on.


Within the "iTunes" folder on this external drive, I have an "iTunes Media" folder, but it also contains the older file structure folders here as well: "Album Artwork", " "Books", "Movies", "Podcasts", "TV Shows", etc. etc.. These folders also all exist inside the iTunes Media folder. Sometimes when I use the File > Add to Library... option or even when I drag and drop something like a movie into the iTunes main window, it will get copied to the iTunes > Movies folder, but sometimes it will be copied to the iTunes > iTunes Media > Movies folder. Sometimes it will get copied to both.


When I look at the item in the iTunes window and command-I or File > Get Info on it, it will point to the iTunes > iTunes Media > Movies folder, but when I browse through the folders in the Finder or the Terminal, I can clearly see the movie file does not exist in that folder, it exists in the iTunes > Movies folder instead. I can still view the content and watch the movie, it is only that the Get Info dialogue box is incorrect.


All of this seems to result in the odd behavior I experience - one day I'll add new content to iTunes and the next day it has disappeared (from the iTunes window, not from the computer itself). I also end up with lots of duplicated content on the drive.


When I access the File > Library > Organize Library menu option, I have the ability to select "Consolidate files" but not "Reorganize files". If I try "Consolidate files" the window pops up with the progress indicating it is moving data around, but it disappears after two seconds and nothing has changed.


Clearly my iTunes is using both file structures and is getting confused about it, but I don't know the best way to fix the problem. I'm worried about manually renaming folders or trying to rebuild my Library as it is probably confused anyway.


Has anyone else seen this kind of behavior?

Mac mini, OS X Mountain Lion (10.8.1)

Posted on Sep 14, 2012 2:24 PM

Reply
Question marked as Best reply

Posted on Sep 14, 2012 5:36 PM

As a general rule don't move any content by hand once it is connected to iTunes.


Here are the typical layouts for the iTunes folders:


User uploaded file


Background:

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 "<Media Folder>" (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.


Why iTunes should sometimes use one structure and sometimes the other now is a bit of an odd one. Are you accessing the same content from different profiles/computers with slightly different settings? I would have recommended that you point Preferences > Advanced > Media folder at /Volumes/<HD Name>/iTunes/iTunes Media which should then have been organized into the different media sections.


As you say there is no reorganize command, but you can trigger this by turning "Keep organized..." off, and then back on again. iTunes can only organize suff inside the active media folder. With your confused structure we can get things moved up into iTunes, but not down into iTunes Media where, in my opinion, they really ought to be. We can do that later if you want but let's concentrate on imposing a little order for now.


  1. Check under iTunes > Preferences Advanced that the media folder really is set to /Volumes/<HD Name>/iTunes and not /Volumes/<HD Name>/iTunes/iTunes Media.
  2. Select File > Library > Organize Library... > Tick Reorganize files in the folder "<Media Folder>" and click OK. Skip if this option is grayed out (already upgraded) or you prefer the older layout.
  3. Select File > Library > Organize Library... > Tick Consolidate files and click OK. This will bring any files currently organized outside the designated media folder into it. NB This will create duplicate copies of any file that needs to be consolidated, and you will need to manually clean up afterwards. Skip if you've already done this...
  4. Select Edit > Preferences > Advanced tab, uncheck Keep iTunes Media folder organized and click OK.
  5. Select Edit > Preferences > Advanced tab, check Keep iTunes Media folder organized and click OK. This triggers iTunes into reorganizing everything inside the designated media folder to the designated structure.


Do you know where your active library files are? Depending on you how you moved things around to get to where you are now the Album Artwork folders and other files could be "current" or remnants of an earlier version. I need to know which before recommending how to proceed.

PS If you really prefer the older layout, but it is already in the new one then edit the file called .iTunes Preferences.plist in your media folder and change the integer from 1 to 0 before doing step 3. (Not recommended).


tt2

16 replies
Question marked as Best reply

Sep 14, 2012 5:36 PM in response to Brent Zionic

As a general rule don't move any content by hand once it is connected to iTunes.


Here are the typical layouts for the iTunes folders:


User uploaded file


Background:

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 "<Media Folder>" (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.


Why iTunes should sometimes use one structure and sometimes the other now is a bit of an odd one. Are you accessing the same content from different profiles/computers with slightly different settings? I would have recommended that you point Preferences > Advanced > Media folder at /Volumes/<HD Name>/iTunes/iTunes Media which should then have been organized into the different media sections.


As you say there is no reorganize command, but you can trigger this by turning "Keep organized..." off, and then back on again. iTunes can only organize suff inside the active media folder. With your confused structure we can get things moved up into iTunes, but not down into iTunes Media where, in my opinion, they really ought to be. We can do that later if you want but let's concentrate on imposing a little order for now.


  1. Check under iTunes > Preferences Advanced that the media folder really is set to /Volumes/<HD Name>/iTunes and not /Volumes/<HD Name>/iTunes/iTunes Media.
  2. Select File > Library > Organize Library... > Tick Reorganize files in the folder "<Media Folder>" and click OK. Skip if this option is grayed out (already upgraded) or you prefer the older layout.
  3. Select File > Library > Organize Library... > Tick Consolidate files and click OK. This will bring any files currently organized outside the designated media folder into it. NB This will create duplicate copies of any file that needs to be consolidated, and you will need to manually clean up afterwards. Skip if you've already done this...
  4. Select Edit > Preferences > Advanced tab, uncheck Keep iTunes Media folder organized and click OK.
  5. Select Edit > Preferences > Advanced tab, check Keep iTunes Media folder organized and click OK. This triggers iTunes into reorganizing everything inside the designated media folder to the designated structure.


Do you know where your active library files are? Depending on you how you moved things around to get to where you are now the Album Artwork folders and other files could be "current" or remnants of an earlier version. I need to know which before recommending how to proceed.

PS If you really prefer the older layout, but it is already in the new one then edit the file called .iTunes Preferences.plist in your media folder and change the integer from 1 to 0 before doing step 3. (Not recommended).


tt2

Sep 15, 2012 10:18 AM in response to turingtest2

Thanks for the detailed recommendations. Here's what we have so far:



1. Check under iTunes > Preferences Advanced that the media folder really is set to/Volumes/<HD Name>/iTunes and not /Volumes/<HD Name>/iTunes/iTunes Media.



This has been checked and confirmed.



2. Select File > Library > Organize Library... > Tick Reorganize files in the folder "<Media Folder>" and click OK. Skip if this option is grayed out (already upgraded) or you prefer the older layout.

Greyed out.

3. Select File > Library > Organize Library... > Tick Consolidate files and click OK. This will bring any files currently organized outside the designated media folder into it. NB This will create duplicate copies of any file that needs to be consolidated, and you will need to manually clean up afterwards. Skip if you've already done this...

This option is available, but upon checking it and hitting OK, nothing happens. No progress bar pops up and there is no change in the file structure. The "Consolidate files" options remains selectable after performing it, as well.

4. Select Edit > Preferences > Advanced tab, uncheck Keep iTunes Media folder organizedand click OK.
5. Select Edit > Preferences > Advanced tab, check Keep iTunes Media folder organized and click OK. This triggers iTunes into reorganizing everything inside the designated media folder to the designated structure.

These two steps triggered a pop up window and it tells me files are being copied. However, after the task is completed, there has been, in fact, no change in the file structure and no movement of any files. It is very odd behavior...


Do you know where your active library files are? Depending on you how you moved things around to get to where you are now the Album Artwork folders and other files could be "current" or remnants of an earlier version. I need to know which before recommending how to proceed.


The active library is in the top level of the iTunes folder designated as the iTunes media folder location. Two screenshots here will probably help to see the structure:


User uploaded file

And the file structure, with the Path Bar underneath. (I meant to highlight the library file, not the library.xml, but you can see they are together and recently modified as I was trying to add more media.)


User uploaded file


At this point I wonder about changing the media folder location to /Dionysus/iTunes/iTunes Media and simply re-adding all my missing content.

Sep 15, 2012 11:40 AM in response to Brent Zionic

Hmm, 4 & 5 shouldn't have created a pop-up - just started things moving.


If you have the room for the duplicates then if you modify the media folder location to /Dionysys/iTunes/iTunes Media and consolidate it should copy everything in from the higher level. Assuming everything moves to where it supposed to you can then delete all but the Library files and Album Artwork & iTunes Media folders from iTunes.


Might be worth checking the permissions before you start. I'm a little hazy on the details for Macs but your account (or everybody) and system should have full access to the entire iTunes folder structure. If iTunes can't move things around it probably won't issue an error to let you know.


iTunes Music Library.xml is a redundant legacy from when your library lived in the usual place.


tt2

Sep 16, 2012 4:27 AM in response to turingtest2

Whew, what a mess. Re-pointing the media folder location to /Dionysus/iTunes/iTunes Media and consolidating did indeed copy everything into the proper location, and I have been able to remove the content from the top level folder. It also duplicated everything inside the sub-folders and re-pointed all the content in iTunes to the duplicated files. The typical duplication pattern appears to be:


  1. Original File.mp4
  2. Original File 1.mp4


The duplicates do not appear in the iTunes window, however. And I have discovered that if I simply remove the "Original File.mp4" manually from the sub-folders in iTunes Media then when I play the content, iTunes will rename the extant file and remove the trailing " 1" from the duplicated filename.


Adding new content now definitely places it in the proper place, now more copying to both structures. All that is left to do is to remove all the duplicates. I suppose I'll have to try and write a script for that...


Either way, thanks for the tips and suggestions, turingtest2, they have really helped!

Sep 16, 2012 4:39 AM in response to Brent Zionic

  1. Add the iTunes Media folder to the library.
  2. Select the Music source
  3. Hold down Shift and use File > Display Exact Duplicates
  4. Sort the list on Date Added
  5. Delete everything added today
  6. Repeat for other media types
  7. For remaining duplicates see Dupin or Dupin Lite
  8. Under Edit > Preferences Advanced, turn Keep iTunes Media folder organized off
  9. Turn the Keep... option back on


tt2


Message was edited by: turingtest2

May 9, 2013 9:07 PM in response to turingtest2

I'm terrified to even attempt to fix this mesh of old structure and new, I just know that the music definitely was duplicted in the new structure's folder. Movies on the other hand I don't know what is being done with them: the old mp4's are in a Movie file and the new ones I haven't figured out where they've been placed, yet.


I'm running OS X Version 10.8.3 with iTunes 11.0.2 (26) with the library on the local MacBook Pro drive (but which I would eventually like to have live on an External HD like I had it set up with my old Sony Vaio running Windows XP).


Hypothetically, If I were to :


- move the entire library to an external hard drive

- uninstall iTunes on my MacBook Pro

- manipulate the directory structure manually so that I can see file for file that I'm not losing anything

- reinstall iTunes

- import the entire library as new (having gotten rid of the .html .txt .ico etc files first)


would that be a 'cure', or would it be suicide for my library?


Also, in the assorted instructions, I don't know how to get to the file paths listed in some of the instructions above.

Please don't send me to the Apple Store.


Any help is appreciated,


Christine

Gilroy, CA

May 10, 2013 4:06 AM in response to cltaylor12

Uninstalling & reinstalling iTunes isn't necessary. It has no effect on the iTunes library.


  1. In iTunes Preferences turn off the options Keep... & Copy...
  2. If you think there could be orphaned files in your existing media folders, that is media files that are in the folders but not connected to iTunes, use File > Add Folder to Library to add the iTunes Media and/or iTunes Music folders, plus any other locations such as the desktop where you may have stored media files.
  3. Make a new iTunes folder on the external drive as <External>/iTunes
  4. Copy iTunes Library(.itl), iTunes Library Extras.itdb, iTunes Library Genius.itdb, the hidden file sentinel and the folder Album Artwork to <External>/iTunes. If your main iTunes Library file doesn't have the .itl extension add it now. Don't copy the .xml file, iTunes will make a new one with a slightly different name.
  5. Press and hold down Option as you launch iTunes. Keep holding until asked to choose or create a library. If iTunes opens normally close and try again. Click choose and open the library file <External>/iTunes/iTunes Library.itl
  6. In iTunes Preferences change the media folder to <External>/iTunes/iTunes Media and turn the options Keep... & Copy... back on.
  7. Use the menu option File > Library > Organize Library... tick the option Reorganize files... if not greyed out and the option Consolidate files. Click OK.


That's it. When iTunes has finished copying files your entire library should be in a consistent self contained structure on the external drive. You should clone this folder to another drive as backup. Once you've backed up you can discard the original folders on the internal drive.


You may still have a few duplicates to eliminate, but that should be easier now without the other concerns. Option > View > Display Exact Duplicate Items should show these, keep one of each repeating group and discard the others, sending to the trash. (Or use a third party tool).


Good luck.


tt2

May 26, 2013 11:02 PM in response to turingtest2

I failed.


I could not find the 'hidden' file sentinal and failed to copy it to <external>/iTunes


I didn't think there were orphaned folders, so I didn't seek them out. I had thought I had saved the library as I did modifications.


When I pressed down Option and choose the library file in <external>/iTunes/iTunes Library.itl, it recreated the structure, again, on my MacBook drive (not on the external drive).


When viewing it, it was not what I had modified. Specifically, the videos I had categorized and labeled etc. did not appear. If I pull them over after the fact (go back to step two after having gotten through step 5), they are grey'd out.


I did not do steps 6 and 7 because I failed at step 5. So now I have a triple structure on my MacBook internal drive, the files copied in step 4 on the external drive, and a big mess on my hands that I don't know how to fix at all.


😟 I think I may be sick.


Christine

May 27, 2013 9:45 PM in response to Brent Zionic

Well, I'm now at the point where I have the library back, but the structure has an iTunes folder with all my bands music in it, along with the iTunes Media folder with a Music folder, with all my bands music in it.


I've manually eliminated duplicates three times in two days. I'll have to do it again tomorrow.


I don't know if importing any new CDs or making changes to the details (meta data, info, or whatever it's called) will modifiy the files within the iTunes Media/Music folder or in the iTunes/Music folder.


I'll keep cracking at it. But I fear any further updates to iTunes and don't know if I want iTunes to do the last two steps or not.


REF:


  • In iTunes Preferences change the media folder to <External>/iTunes/iTunes Media and turn the options Keep... & Copy... back on.
  • Use the menu option File > Library > Organize Library... tick the option Reorganize files... if not greyed out and the option Consolidate files. Click OK.

May 28, 2013 10:47 AM in response to cltaylor12

Hi, sorry not to have got back to your sooner. I've spent the last few days migrating 20+ workstations to a new server and will be happy if I never need to see another remote desktop again. 👿


When iTunes consolidates it creates copies inside the media folder of anything stored outside of the media folder. Depending on what you've done so far that might explain why you have the copies of files in iTunes\<Artist>\<Album> folders as well as iTunes\iTunes Media\Music\<Artist>\<Album> which is where they should be.


One way of avoid that problem is to use my two scripts Unconsolidated and ConsolidateByMoving.


I suspect one set of tracks is no longer connected to iTunes, the question is which? Inspect the Get Info. data for a few individual tracks to see where they are stored from the summary tab. Assuming the active files are in the media folder you could move the others out of the top level iTunes folder, then check everything still works.


As for duplicates....


Use Shift > View > Show Exact Duplicate Items as this is normally a more useful selection. You need to manually select all but one of each group to remove. If you have multiple references to the same files then don't send to the recycle bin. Use my DeDuperscript if you don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.


As for these two...

In iTunes Preferences change the media folder to <External>/iTunes/iTunes Media and turn the options Keep... & Copy... back on.


This won't create any duplicates, but will ensure each track has the "usual" name. E.g. if you had dupes <File>.<Ext> and <File> 2.<Ext>, and in deduping cleaned up <File>.<Ext> rather than <File> 2.<Ext> then this process would rename <File> 2.<Ext> as <File>.<Ext>.


Use the menu option File > Library > Organize Library... tick the option Reorganize files... if not greyed out and the option Consolidate files. Click OK.


"Reorganize files..." tells iTunes to use the "new" layout with the extra Music folder inside the media folder. iTunes will move any music that is inside the media folder to correct path without creating duplicates. As above, "Consolidate files" will copy in any files that are still outside the media folder, leaving originals behind. These originals are not connected to iTunes and can be deleted. (But backupthe library first.)


tt2

May 28, 2013 12:55 PM in response to turingtest2

Thank you. I hear you on the remote access, LOL.


I will do this probably Thursday. I need a break from looking at iTunes. I think once I have it set correctly and discover the set not in use, I'll keep the X-HD as the back up and try to pull it back to the MacBook. Otherwise, any time I open a media file to view iTunes wants to know if I want to start a new library if my XHD isn't connected.


Thank you again!!!!

My iTunes is using both old and new folder structures...

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