iTunes 12.9.5.5 - Mojave, Need Help with main Folder structure

Good Morning,

A few weeks ago, I had a power failure and my iTunes database got corrupted.

I could only come up with an backup from some years ago, where all my music files where stored in a different place then now, so eventually I had to redo everything and while doing so I also checked out duplicates etc.


The problem is that as my folder moved from one place to the other over the years I started to have duplicates folders and files inside that main iTunes folder and I could not figure out how to sort out everything and could not find a good article that will help me that.


I have made screen shots that will explain my iTunes prefs and folder, hoping that someone could please help me understand how to arrange it all. My questions are below the screenshots.





1. The main issue is that I'm unable to figure out which folders inside the "iTunes" (main folder) are being used, and if it uses the folder called "iTunes Music" which is located inside the "iTunes" main folder.


2. Itunes database

I could not understand which file is the database. Is it the the "iTunes Library.xml" that is not updated although I made many changes after the 21 May 2020,

or is it the "iTunes Library.itl" which appears in 2 places but only 1 of them is updated for today?


3. Podcasts - 1st folder is under iTunes>Converted>Podcasts 2nd is under iTunes>iTunes Music>iTunes Media>Podcast; 3rd one is under iTunes>⁨iTunes Music⁩.


I tried to move all the podcasts to one folder (the 1st I described).

Not all the podcasts you can see in the screenshot appears in iTunes and I don't know how to fix that...


4. "Previous iTunes Library" folder - also appears in 2 places. Can I delete it? which one shall I keep?


Any help will be deeply appreciated I'm so frustrated by this.

Thanks in advanced,

Shlomit

Mac Pro, macOS 10.14

Posted on Jun 30, 2020 2:14 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 30, 2020 4:16 AM

Hi,


See Make a split library portable - Apple Community for background.


Here are the typical layouts for the iTunes folders: The images are from Windows, but the overall layout is the same:



The core of the library is the iTunes Library.itl file. The XML, if present, provides third party apps a way to read the iTunes library even if iTunes isn't running. The exact name of the file depends on the location of the library and/or the name of the .itl file. The .itl file is updated each time you run iTunes, so your active library is the one with the most recent timestamp. You can hold down option as you launch iTunes to choose a different library if you want to see what the differences are.


You can discard the .tmp files. You don't generally need to keep the all files in the Previous iTunes Libraries folder. One or two recent files could potentially be used for disaster recovery when you don't have any other form of routine backup of the .itl file.


The active media folder should be called iTunes Media and be in the same folder as the active .itl file. iTunes Music is the old name for this folder. On a Mac you should be able to rename the folder without affecting links to the media. You may also be able to move folders from one place to another as long as they stay on the same volume and you don't overwrite one folder with another.


The main library folder should normally contain the library files and the folders Album Artwork, iTunes Media, and (optionally) Previous iTunes Libraries, and nothing else. The iTunes Media folder should contain folders for each type of media, that is in the library, such as Music, Podcasts, Voice Memos, etc. Compilations would normally be inside Music, having it one level higher indicates the older layout version. There are also the folders Automatically Add to iTunes and Downloads. These last two should normally be empty.


You should be able to use File > Library > Organize Library > Consolidate Files and Rearrange Files to bring copies of all the files connected to the library into the active media folder. You can then delete the various copies of things that remain outside of the media folder, although you probably want to check for orphaned files, i.e. things you want to keep that aren't currently listed in the library. These can moved into the Automatically Add to iTunes folder inside the media folder to absorb them into the library.


iTunes 12.7 dropped support for iOS apps, but if you're keeping your archive of Mobile Applications this folder should be moved into the media folder.


tt2

Similar questions

8 replies
Question marked as Top-ranking reply

Jun 30, 2020 4:16 AM in response to ShlomitH

Hi,


See Make a split library portable - Apple Community for background.


Here are the typical layouts for the iTunes folders: The images are from Windows, but the overall layout is the same:



The core of the library is the iTunes Library.itl file. The XML, if present, provides third party apps a way to read the iTunes library even if iTunes isn't running. The exact name of the file depends on the location of the library and/or the name of the .itl file. The .itl file is updated each time you run iTunes, so your active library is the one with the most recent timestamp. You can hold down option as you launch iTunes to choose a different library if you want to see what the differences are.


You can discard the .tmp files. You don't generally need to keep the all files in the Previous iTunes Libraries folder. One or two recent files could potentially be used for disaster recovery when you don't have any other form of routine backup of the .itl file.


The active media folder should be called iTunes Media and be in the same folder as the active .itl file. iTunes Music is the old name for this folder. On a Mac you should be able to rename the folder without affecting links to the media. You may also be able to move folders from one place to another as long as they stay on the same volume and you don't overwrite one folder with another.


The main library folder should normally contain the library files and the folders Album Artwork, iTunes Media, and (optionally) Previous iTunes Libraries, and nothing else. The iTunes Media folder should contain folders for each type of media, that is in the library, such as Music, Podcasts, Voice Memos, etc. Compilations would normally be inside Music, having it one level higher indicates the older layout version. There are also the folders Automatically Add to iTunes and Downloads. These last two should normally be empty.


You should be able to use File > Library > Organize Library > Consolidate Files and Rearrange Files to bring copies of all the files connected to the library into the active media folder. You can then delete the various copies of things that remain outside of the media folder, although you probably want to check for orphaned files, i.e. things you want to keep that aren't currently listed in the library. These can moved into the Automatically Add to iTunes folder inside the media folder to absorb them into the library.


iTunes 12.7 dropped support for iOS apps, but if you're keeping your archive of Mobile Applications this folder should be moved into the media folder.


tt2

Jul 1, 2020 12:09 AM in response to turingtest2

hi tt2:)

First, I would like to thank you for your answers. From reading many posts about iTunes, I saw you are a real expert, but wasn't sure if you also know the mac but I wished it was you that will answer and you did :)


I was extremely afraid to do it, so I first copied the whole folder to another place and then started to arrange all files and folders. Here is my final iTunes folder sort order:



Is the Consolidate files option is copy all the tracks that were added to iTunes into the iTunes folder? If yes, then I don't want to to that as I prefer all my music tracks to be kept in an outside folder as I have my own way to sort them.

Anyway, I didn't use it and moved the folders manually as you can see in the screenshot.


Now, after I almost finish to rebuild my playlists, it's time to find all missing tracks that are marked with "!" in the songs main playlist. The problem is that for some reason iTunes do not mark all missing fils. Some of them appears to be OK and only when I try to play them do iTunes tells me that they are missing and then add the "!" sign. Do you know of a way or a script that will check all the tracks at once?


I'm also wondering about the high weight of the Album Artwork. I read about it, but not really understood how it works. In many cases I add the album cover myself, I wonder whether iTunes saves the cove is kept in the Album Artwork folder. I wonder if there is a way lower the weight.


Again, thank buy so so much 😊🙏🌻

Have the best day,

Shlomit

Jul 1, 2020 8:57 AM in response to turingtest2

Yes, my music stored somewhere else. :)


I need to delete the missing files, not to fix the broken links.


The only backup I had was from years ago, so all the files location was on a hard disk that no longer exist.

I also delete and changed many things since then, so it was easier to delete the files from the playlist instead of relink them (with alt to remove it from all the library).


Eventually I have fixed my library manually, but some of the files that are no longer exist and want to delete, will don't show the "!" mark (some do some don't) and they only get this mark when I try to play them. This is quite annoying as I need to guess which ones are missing.


Never the less, I did find out that if I select a bunch of tracks and select the get info and then press ok, suddenly those who are missing get the "!" mark. I just don't get why it didn't get it before. I thought the maybe there is a script that can auto do that as iTunes is not.


Thank you so much for your help

Shlomit


Jul 2, 2020 5:54 AM in response to turingtest2

hi tt2,

I can't make automatic things, I'm really afraid it will change and/or delete the wrong track.

I used the method of get info for a few trucks, every time a bunch of them, and I manually deleted the ones I needed to delete.

There were also duplicated files that I wanted to see whether they are duplicate but appears in the same folder or exists on another folder.


Anyway, I finally finished and I'm happy.

Thank you so much:)

Jul 1, 2020 2:28 AM in response to ShlomitH

The "missing file" issue with exclamation marks happens if the file is no longer where iTunes or Music expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, one of its parent folders, the drive it lives on has had a name change, or you've moved a non-portable library to a different path (see Make a split library portable for details). It is also possible that iTunes or Music have changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout, or vice-versa, and so is looking in slightly the wrong place, or that you've been too aggressive when deleting duplicates at some point.


Select a track with an exclamation mark, use Cmd-I to get Song Info, then click No when asked to try to locate the track. Look on the file tab for the location the library thinks the file should be. Now take a look around your hard drives. Hopefully you can locate the track in question. If a section of your library has simply been moved, a folder renamed, or a drive label has changed, it should be possible to reverse the actions. If the difference between the two paths is an additional Music folder in one path then this is a layout issue. I can explain further if that is the case. If everything is where it is supposed to be try Repair security permissions for iTunes for Mac - Apple Community.


In some cases the library may be able to repair itself if you go through the same steps with Get Info, or when playing a track, but this time click Locate and browse to the lost track. It may then offer to attempt to automatically fix other broken links. Although it says something like "use the same location" I think it expects to find the tracks in the same artist & album layout they were in previously, with one systematic change to the path.


If you want me to try to provide specific advice please post back the following details:

  1. The location of the media folder under iTunes|Music > Preferences > Advanced
  2. The location of a sample missing track shown under Song Info > File > Location that begins file://
  3. The true path to the file whose details you gave in 2



See also FixLinks - an AppleScript to repair broken links in Music - Apple Community. I notice your content is predominantly podcasts but the script in its current form has been designed for Music, and Catalina. I should be able to update it, or create an alternate version, but it might be helpful if you can supply the answers to 2. and 3. just so that we're singing from the same hymn sheet.



tt2

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.

iTunes 12.9.5.5 - Mojave, Need Help with main Folder structure

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