Management of the location of songs in iTunes Mac

Hello everyone, I just made a fantastic new discovery: when I drag a song into the iTunes window, regardless of the Preferences chosen, the song will go into a "music" folder, rather than surreptitiously going to store nicely in the artist's folder already present in my base folder. Same when I have to search for a song that has lost its link. In addition, impossible to register as before additional information in the tag of the piece: it will not be found in the same piece, but I discover on closer inspection, that are in the same folder: the piece of original plus a copy of the song with the addition I made!!! Morality, I have already evacuated, ONE AT A TIME (sic!) 2 T of duplicates, while pieces continue to be added to this famous 'music' folder.
I've been in a divorce from iTunes for two ages now and of course no one on the hotline seems to know about any of this, so any observations haven't been escalated to the devs, the problems persist, and worse, they're getting worse . How do you do, those like me who have to go through the throes of this program which should be our beloved Apple's best ever?
Thank you for your attention and all the best.


iMac 27″ 5K, macOS 12.6

Posted on Dec 26, 2022 4:11 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 28, 2022 6:24 AM

Hi David,


This is a user to user support forum. I cannot connect you with anyone at Apple, but I'd like to think I have a deep understanding of iTunes and Music, and how to resolve various issues with them such as reorganizing the media folder, repairing broken links, deduplicating, etc. Because I help here in my free time it is much easier to work by exchange of written posts rather than get involved in real time conversations.


Perhaps if we start by focusing on this issue of songs going into the extra Music folder when you add them to the library first. This should be a fairly easy fix. Check under Music > Preferences > Files to see what the path is to your active media folder, close Music, open that folder in Finder, enable hidden files with Cmd+Shift+. then open .Media Preferences.plist with TextEdit and change the integer value inside from 1 to 0. Save and close the file, then launch Music. New additions to your library should now go to <Media Folder>/<Artist>/<Album> instead of <Media Folder>/Music/<Artist>/<Album>. You can rearrange anything connected to the library by turning the Keep organized option off and then on again. Making this change may potentially fix some of your broken links.


tt2

Similar questions

38 replies
Question marked as Top-ranking reply

Dec 28, 2022 6:24 AM in response to teoraim

Hi David,


This is a user to user support forum. I cannot connect you with anyone at Apple, but I'd like to think I have a deep understanding of iTunes and Music, and how to resolve various issues with them such as reorganizing the media folder, repairing broken links, deduplicating, etc. Because I help here in my free time it is much easier to work by exchange of written posts rather than get involved in real time conversations.


Perhaps if we start by focusing on this issue of songs going into the extra Music folder when you add them to the library first. This should be a fairly easy fix. Check under Music > Preferences > Files to see what the path is to your active media folder, close Music, open that folder in Finder, enable hidden files with Cmd+Shift+. then open .Media Preferences.plist with TextEdit and change the integer value inside from 1 to 0. Save and close the file, then launch Music. New additions to your library should now go to <Media Folder>/<Artist>/<Album> instead of <Media Folder>/Music/<Artist>/<Album>. You can rearrange anything connected to the library by turning the Keep organized option off and then on again. Making this change may potentially fix some of your broken links.


tt2

Jan 27, 2023 4:16 AM in response to teoraim

teoraim wrote:

okay thank you very much, the problem of the trash seems now to be fixed, however the new files will always be housed in this new MUSIC folder and not in their respective place. I would very much like to find a solution because I would also have to start relocating all my files that have lost their links, more than 50,000…


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.


* The layout issue with or without an additional Music subfolder is the thing I thought we tackled back here.


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.



tt2

Dec 27, 2022 1:22 PM in response to teoraim

Let us start by making your post legible.


teoraim wrote:

Hello everyone, I just made a fantastic new discovery: when I drag a song into the iTunes window, regardless of the Preferences chosen, the song will go into a "music" folder, rather than surreptitiously going to store nicely in the artist's folder already present in my base folder. Same when I have to search for a song that has lost its link. In addition, impossible to register as before additional information in the tag of the piece: it will not be found in the same piece, but I discover on closer inspection, that are in the same folder: the piece of original plus a copy of the song with the addition I made!!! Morality, I have already evacuated, ONE AT A TIME (sic!) 2 T of duplicates, while pieces continue to be added to this famous 'music' folder.

I've been in a divorce from iTunes for two ages now and of course no one on the hotline seems to know about any of this, so any observations haven't been escalated to the devs, the problems persist, and worse, they're getting worse . How do you do, those like me who have to go through the throes of this program which should be our beloved Apple's best ever?

Thank you for your attention and all the best.


OK, so some of your content is going into your designated media folder, and some is going into a Music subfolder within that media folder, if I understand you correctly. Given you are running macOS 12.6 the app in question is called Music rather than iTunes. See Managing your Mac media libraries - Apple Community and in particular the section on iTunes Media Organization.



See this post Music File - Apple Community on fixing broken links and Duplicate songs in iTunes/Music - Apple Community for advice on duplicates.



tt2

Jan 18, 2023 3:04 AM in response to teoraim

Great. Now in Finder browse to the folder /Musique/Music/Music, and look for the hidden file .Media Preferences.plist. You may need to use Shift+Cmd+. to show/hide hidden files. Once you have found the file you should be able to open it with TextEdit (a standard Mac application) or some other text editor. The contents will look a bit like this:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>GUID</key>

<string></string>

<key>Layout Version</key>

<integer>0</integer>

</dict>

</plist>


The integer value controls whether artist folders end up in /Musique/Music/Music (0) or /Musique/Music/Music/Music (1). If you want your artist folders to go one level higher, i.e. into /Musique/Music, then you need to set the media folder in preferences to /Musique/Music, then make sure that the new .Media Preferences.plist created in this folder has the integer value of 0, after which if you turn Keep organized off, and then back on again, Music will rearrange all of the artist folders bringing them up to this new higher layer.


tt2

Jan 29, 2023 4:16 PM in response to teoraim

Hi there.


  1. Is Musique the name of an external drive? Here on my Catalina system my media folder is stored at /Catalina/Users/steve/Music/Music/Media (I'm Steve by the way) but if I made a library on my external drive that folder would be something like /External/Music/Media, i.e. volume name, library folder, and then media folder. This layout seems to be correct.
  2. Ouch. That looks exceedingly wrong. I've no idea how that might happen.
  3. I'm assuming you can find the missing file. Hopefully at a slightly shorter path, possibly with a leading track number, and a file extension. E.g. /Musique/Music/Music/Billie Holiday/Lady Day & Prez _ Lester Young/<Track #> I'll Get By (As Long as I Have You).<Ext>.


If the location of the song is predictable then FixLinks should be able to repair the broken links for selected tracks that have a similar pattern.


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.

Management of the location of songs in iTunes Mac

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