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

Can I change the location of a song in Catalina Music?

Is it possible to tell my songs in Catalina's Music app the correct location if it has a wrong location? I have some songs copied to wrong directories. The original songs are where they belong, but the Music App sees some songs in a folder it created weirdly elsewhere.


Also, I have some songs that point to the a copied song instead of the original. I'd like to get rid of song1.m4a, but the music app is pointing there instead of the song.m4a in the same folder.



iMac Line (2012 and Later)

Posted on May 17, 2020 6:46 PM

Reply
Question marked as Best reply

Posted on May 24, 2020 8:38 AM

With those two songs what do you see for them for the location under Get Info > File tab? The full and exact path if you can. Replace your user name with <User> if needed. You could potentially right-click and remove download for the first song, then right-click and add to library for the second one. That might assimilate the accessible track into the cloud library while preserving the play count.


tt2

Similar questions

54 replies
Question marked as Best reply

May 24, 2020 8:38 AM in response to howardfromlafayette

With those two songs what do you see for them for the location under Get Info > File tab? The full and exact path if you can. Replace your user name with <User> if needed. You could potentially right-click and remove download for the first song, then right-click and add to library for the second one. That might assimilate the accessible track into the cloud library while preserving the play count.


tt2

May 26, 2020 7:18 AM in response to howardfromlafayette

Sort the Song list as Album by Artist, then select all of the tracks by artists that begin with A and run the script again. Where you have both variations such as this:

and there are broken links the script will always pick the second track first so there is a risk that you may end up with two entries in the database connected to the same physical file (something I call a logical duplicate). Depending on how long it takes to do artists beginning with A, and how many failures that throws up, you might want to proceed one letter or time or go for the whole library.


I suggest we leave the niceties of deduping until after the broken links are resolved however if you want a brief grounding take a look at Duplicate songs in iTunes - Apple Community. Consolidating the library into the default media path of /Users/HBrazee/Music/Music/Media would remove the logical duplicates (each entry gets consolidated independently while the original file is left in place), which should make it safe to eliminate content that iCloud Library has already flagged as duplicates, deleting the underlying files at the same time, so as to clean up the resulting media folder and leave you the tracks with ratings and play counts. Turning keep orgainzed off and then on again will tidy up any trailing digits in the files that remain.


See Handling grey stars - Apple Community for more on what those are about and how you can eliminate them if desired. Definitely lower down on the priorities right now.


tt2

May 18, 2020 11:15 AM in response to howardfromlafayette

Hello Howard,


Thank you for using Apple Support Communities! I understand that you'd like to correct the location where certain songs are stored on your Mac running macOS Catalina. The path for some music files also point to a copy of the song, instead of the original file. I would be happy to help with next steps to correct this.


The "Change where imported files are stored" section in the resource below will walk you through how to change the location for the songs. You may also want to follow the additional steps to consolidate your files in the Music folder after:


Change where your music files are stored on Mac - Apple Support


To find and remove duplicates of a song, follow these steps:


Find items and duplicates in Music on Mac - Apple Support


Cheers!

May 19, 2020 4:18 AM in response to howardfromlafayette

Hi, you've got a couple of things going on here, broken links to tracks, duplicates in the library, and in the media folder. I assume from the icons that you've also got an Apple Music or iTunes Match subscription. One way of fixing the tracks that show with an exclamation mark is to right-click and use the remove download option. You can then either reimport your locally stored copy or download from the cloud. Doing this should preserve your play counts and ratings. Once every locally stored file is connected to the library you should have some that are marked as duplicates - see Identify cloud status icons in your music library on your Mac or PC - Apple Support. You should be able to sort by status and delete the duplicates along with their underlying files in the media folder. Finally turning keep organized off and on again should rename any files in your media folder that have a trailing 1 in their file name. Test the process with a single album's worth of tracks (remove downloads for broken links, import local files, eliminate maked duplicates, etc.) Assuming that behaves as I've described repeat with the rest of the library.


See also https://dougscripts.com/itunes/index.php - List MIA's, Super Remove Dead Tracks, Media Folder Files Not Added and similar scripts might prove useful when cleaning up the library. As always, start with a backup.


tt2

May 25, 2020 5:19 PM in response to turingtest2

See FixLinks - an AppleScript to repair broken links in Music - Apple Community for the script. I've tested it by adding some tracks into an empty test library, copying the contents of the media folder to a higher folder, deleting what is in the media folder and emptying the trash, then selecting the tracks in Music, running the script, and pointing it at my higher level folder where the artist and compilations folders are. It should correctly predict the locations for a variety of media kinds, deals with missing artist or album values, and should make the same character substitutions that Music and iTunes do for

/ ? < > \ : * | " to underscore. MPEG-4 video can be linked if stored with either .mp4 or .m4v file extension and tracks with a trailing " 1" in the filename can be linked.


Test with a small sample to begin with, then try the rest if successful. If it fails to locate some of your broken content please supply some examples of the true path and the failed guess.


tt2

May 26, 2020 11:12 AM in response to howardfromlafayette

howardfromlafayette wrote:

I was wondering why you had me select my music.

The script processes selected tracks. Running against the whole library may not be prudent.


Could you put the URL of FixLinks in a comment in the code (and in your reply)?

Done, the updated script is at https://discussions.apple.com/docs/DOC-250002671


My wife wants me to go shopping right now. I cancelled the script after pressing OK 50 times for not found. I'll try again when I get back (or maybe try your newest version). (I saw that many of the rejections were in /music/compilations). Then I should run it again selecting /music/music?

Yes. Unless I can add in the code to do that automatically before you get back from the shops.


tt2

May 18, 2020 3:54 PM in response to Teddy_B

Yeah, I've tried most of those. Here's a screen print showing what I have:

Notice that I have copies of the songs that include blue stars and play counts. Those are the versions on Apple Music. But the (!) indicates that if I search for those songs, they won't be found. I can find the songs, but that is tedious with as many as I have. Very tedious. Also, I see that there are two versions of 1812 Overture in the "Sample Surround" folder. In this case, the one I want to keep is the original, but sometimes it isn't. It looks like I have hours and hours of work ahead of me to make sure the right version is pointing to the right song and others are deleted.

May 19, 2020 6:35 AM in response to turingtest2

Yes, I have Apple Music.


It’s interesting that the exclamation marks disappeared after I rebooted.  Clicking on Library/Organize Library gave me the option to Consolidate Files, but not to Reorganize the files in Music.  Doing this got the exclamation marks back.


I went to a smaller playlist, right-clicked a song, and was not given an option to “Show in Finder”. I used a utility to find that song, and found it in music/Apple Music.  OK, I have a couple of hundred songs which I only have because of Apple Music, out of my 13,477 songs that my Music App shows.  


I suspect that maybe 5-6 thousand of those songs are duplicates with the exclamation marks.  I don’t see a way to sort my songs into exclamation mark order.


Changing thousands of songs one at a time won’t be an easy task.


I picked a song, “The 59th Street Bridge Song”.  The first copy had the double cloud icon, and it pointed to where it belong in the finder.  The second copy did not give me an option of finding it.  So I told it to remove download.  Then it had the download cloud icon.  I clicked on it.  I could show it in finder.


Funny thing is, the “show in finder” for these two copies of the song are confusing.  The newly downloaded song is in music\music\Simon & Garfunkel\Simon & Garfunkel’s Greatest Hits\ in a directory by itself.  Cloud status is “uploaded”.  So I deleted that downloaded song altogether.


Trouble is, the remaining version shows that I played it once, not 77 times.  It lost my meta-data.


Looking at various songs, I see cloud status of “Duplicate”, “Uploaded”, “Waiting”, “Matched”, & “Error”. Sorting by cloud status is not the same as sorting by exclamation mark.


So it’s looking that I need to go through my songs, select 5-6 thousands one-by-one that have exclamation points, and then delete those songs, starting over with meta-data?!?!  This looks like a candidate for Doug’s AppleScripts, except I really, really want to keep my meta-data with the copy of the song that I keep.

May 24, 2020 8:23 AM in response to turingtest2

"List MIA" demo mode found 5846 files as unavailable/inaccessible. I picked one randomly. On my Music app, I see the version with a (!) is the version that has a play count. It appears that if I upgraded "List MIA", and ran it, I would lose that play-count (and maybe other meta data.


I haven't been able to find an e-mail for Doug. Maybe I need a different script.

May 25, 2020 6:36 AM in response to turingtest2

When I try to Get Song Info with an (!) song, I get a pop-up asking me "The song “You're Nobody Until Somebody Loves You” could not be used because the original file could not be found. Would you like to locate it?". I didn't realize that if I cancelled, it would show the Get Info data anyway!


file:///Users/HBrazee/Music/Music/Ray Charles/The Essential Collection/14 What'd I Say 1.m4a

/Users/HBrazee/Music/Ray Charles/The Essential Collection/14 What'd I Say.m4a


Interesting that the (!) version included the prefix "file://" that is not in the other version.


May 26, 2020 2:14 AM in response to howardfromlafayette

howardfromlafayette wrote:

Sorry for being so dense..

So do I test it with
/Users/HBrazee/Music/Amanda Palmer/Amanda Palmer Goes Down Under
Then later run it with /Users/HBrazee/Music/ ?


My mistake for not being clearer, and making an error in my suggested start point. As a test you would select the Amanda Palmer tracks in Music, then point the script at /Users/HBrazee/Music/ (I put an extra /Music in). It isn't as clever as my Windows version which has a variable depth search and partial matching. This script is going to look at:


<Target Folder>/<[Album]Artist>/<Album>/[D-]<Name>[ 1].<Ext>


Here I've deliberately renamed a file so it cannot be found. My target folder is /Users/steve/Music/FixLinks, and it is looking in the right folder for the track, but I added a trailing 3 which the script cannot check for so it failed to find it.



True path: /Users/steve/Music/FixLinks/a-ha/Take On Me/01 Take On Me 3.mp3 - if I restore the original filename it would be successful. As I say if you start in /Users/HBrazee/Music/ you should get a high degree of success based on the paths you've shared so far. I can refine the script once I know where it fails.


tt2

May 26, 2020 6:10 AM in response to turingtest2

OK, here's what I found. I misunderstood how to select songs before. This time I found a selection of songs with some variations. "For What It's Worth" had a 1.mp3 and a regular .mp3. "For You" had both songs with greyed out stars. "For Your Love" had greyed out stars and blue stars. When I ran it against "For What It's Worth" I did not get a finder menu. With the other songs I got the finder pointing to Music, which I choose.

Hmm, I didn't screen print enough. It did not change anything.


So none of these songs have the (!) anymore. I suppose that if I selected all of my songs, that will be eliminated.

I then selected the two changed songs and deleted them from library, but keeping the files.


I suspect it would be safe to select a thousand songs at a time that way.


The songs like this will be harder to discover:


In this case, it's the 1.mp3 that has greyed out stars, whatever that means. Oh, and "For You" still has greyed out stars.


Thanks for you work!!!

May 26, 2020 10:23 AM in response to turingtest2

I found it. It's in music/music


Note, that doesn't have the whole album, and it has a duplicate 2.m4a.

There's another song in music/music/Kathryn Grayson/Show Boat (And other performers as well).


I changed my view settings and did a run with before and after pictures:


That's weird, it's looking for file:///Users/HBrazee/.Trash/01 Con Te Partirò 1.m4p I don't know where that used to be to restore from Time Machine. So it's looking like I should try selecting everything from "Only Downloaded Music", and run your script. Someday I will need to figure out why those showboat songs are separated.

May 26, 2020 3:19 PM in response to turingtest2

Thanks. I ran the script:

13304 items were processed,

4630 items were updated,

375 items were not located,

8299 items needed no action.


I wish I had timed it. & I'm glad I told it not to tell me about each "not located". All I know is that it would have taken me weeks to do it. Maybe I should have compiled it. I had some trouble saving the script, but I think it saved now.


I then organized the library. The first two (!) songs were songs that EasyFind could not find. The next one is here:

The first is in the trash, the next two point to the same file. One of those has cloud status of "Uploaded" and one as "Duplicate". Interesting that they both have play counts.


After viewing "All Music", I see near the top of the alphabet:


What should my next steps do?

May 19, 2020 7:22 AM in response to howardfromlafayette

The exclamation marks are only shown once the library has had cause to notice that tracks aren't at their expected locations. This is a trick for revealing dead links which I assume still works in Music.


Lost & Found Playlists

Create a playlist called Found, select everything in Music and drag it into the Found playlist. Create a smart playlist called Lost matching only Music items and the rule Playlist is not Found. Your lost tracks will be in this playlist.


I've got Windows scripts for fixing broken links and safely deduping but I can't directly port those to OS X. If you look at Get Info (Cmd+I) for a broken track without trying to fix it and then look at the File tab you should be able to work out where Music thinks that track ought to be. Perhaps it is possibly for you to move things to where they should be. If you can show me the broken path and the real location I might have some insight.


tt2

Can I change the location of a song in Catalina Music?

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