Some audio files not visible in the Finder

A couple of months ago I finally made the jump from Mojave to Monterey on my 2017 27" iMac with 2TB fusion drive. Recently I happened to be looking at files in my iTunes Music folder, and I find not all files are visible there, even though the Music app says they exist.

For example, the Music app shows me 16 songs in the Who’s Next album, but the finder only shows me 9 files in /Users/Larry/Music/iTunes/iTunes Music/The Who/Who’s Next. In Music, if I do Get Info on one of the “missing” files, it shows me the correct location. And the track plays fine.

I was looking at a different album, which was also missing some files in the Finder, and I had Music’s Get Info window open for the first track in that album. As I pressed the > button to scroll through the tracks in Music, the missing tracks appeared in the Finder, one by one, as I continued to scroll. Really. However, I have been unable to duplicate that in other folders. [Update - I have been able to duplicate this with some folders, not others. And I have also found complete folders not visible in the Finder that appear when I select the folder in Music or when I do Get Info on the first track. I’ve also found an album for which the files are completely missing but are still listed in the Music app.]

I have force-restarted the Finder. I booted from Recovery and ran Disk First Aid, which found no problems. I checked my APFS backups (by Carbon Copy Cloner - I do not use Time Machine), which match my boot volume.

I have not noticed any other type of files that are missing, but of course I have gazillions of files and use/look at only a small subset.

What has happened to my files and how do I make them visible in the Finder?

Are you using some kind of iCloud service (maybe iTunes Match)? Maybe the files are not on your computer, but are being synced from the cloud when iTunes requests them.

Just a guess.

Thanks, David, but no. I’m not using iTunes Match or Apple Music or anything else that would upload my files somewhere.

This is grasping at straws, but I wonder if using some variant of the Unix touch command in Terminal would cause the Finder to see these files. Hopefully someone who’s more Unix-savvy could suggest an approach.

How about cross-checking what the Finder is telling you by cutting and pasting the following into a shell opened via the Terminal.app

ls -al /Users/Larry/Music/iTunes/iTunes\ Music/The\ Who/Who\'s\ Next

(yes, the backslashes are important because spaces and the quote are interpreted by the shell otherwise)

2 Likes

Good idea. That shows me the same incomplete list of files that the Finder does. What does that tell us about the nature of the problem?

I’d really concentrate on the file location for each track of the album reported by Music. The Finder and the file system are in agreement so there’s something up with where Music’s database thinks the files are.

2 Likes

It means that the files really aren’t on your computer’s storage until you do a Get Info from Music, at which point, they’re being written there. As you observed.

If these are tracks you’ve ripped from CDs or have otherwise manually added to your Music library, and you’re not using any kind of cloud-based music storage, I have no clue why that might be happening.

If these are iTunes purchases, then it is possible that macOS has deleted the files in order to free up space (part of Optimized Storage), and is re-downloading them on-demand when the Music app needs access.

David, you led me to solve the problem. I do not have iTunes Match or Optimized Storage or anything else that automatically sucks files from my Mac into the netherworld of cloud storage - I shudder at the thought.

So my question to you was going to be, if the files were not on my computer’s storage, where would they be hiding until I did the Get Info command?

I did a search in the Finder for one of the missing files. And it showed up. And a closer examination showed that it was in ~/Music/iTunes/iTunes Music/Music/The Who. There’s a Music folder within iTunes Music! At first glance, all the missing ones from Who’s Next are within that folder.

Brilliant software from Apple, moving an apparently random selection of files into this folder. 6,375 of them to be precise. The Music app apparently virtually merges the files in the two folders when it shows the files in that album. When when I do the Get Info in the Music app, it correctly shows where the file is. I just didn’t notice the insertion of that Music folder into the folder hierarchy.

And, as I noted, sometimes but not always, Music moves the files from the one location to the other when I do that Get Info.

What I didn’t try is the Show in Finder command in Music (instead of Get Info), which would have led me to find the files.

One other quirk. When I did the search, which I do with command-F, it showed the file name without the preceding track number. So in the search results, it showed just My Wife, whereas looking at that folder in the Finder shows 04 My Wife. I can’t explain that.

There isn’t a day when I don’t wish that Apple would stop concentrating on broadcasting football games and would concentrate on making robust software. But this is America, and you can’t make your shareholders rich (I am not one of them, at least not directly) by upgrading software from “it barely works” to “it just works.”

You can try File / Library / Consolidate to make sure that all files are moved to the proper spot in the media folder. (Read the note on that option, though; it may leave you with duplicate files.)

This is actually the organization I would have expected. We both have clearly been upgrading our Macs for many years, since the early days of iTunes. As a result, we’ve got folders using old (obsolete?) naming conventions.

The iTunes Music folder got renamed to iTunes Media at some point, but this change only affects new libraries. Old libraries don’t get renamed. The reason for the rename is that it contains more than just music. On mine, I have “iPod Games” (for those old games running on click-wheel iPods), “Mobile Applications” (back when iTunes could manage apps), “Music” (for music) and “Tones” (for ring tones). Today, all those folders are empty, because the Music app doesn’t manage any of this anymore (and I moved my own content out of there in order to have a backup), but they were once managed by iTunes and so my (and I assume your) system still has the vestiges of that organization.

What I don’t understand is why you’re seeing anything anywhere else or why Music is moving files out of that location as you access them. But that might simply be the result of the app gradually moving files from an old organiztion to a new one. Possibly as a part of the upgrade to Monterey (I’m still running Big Sur). It may be choosing to move files as you play them instead of doing a bulk-update, which might take a long time to complete.

Yes, I will do this after I clean out other types of media in the iTunes Music folder. I no longer use Apple’s apps to access any of them, so I will move them somewhere safe.

Thank you. This is exactly right, though I read this and David’s answer at the same time and followed up from David’s. As I noted in my reply to him, if I had done what you suggested and looked carefully at the location reported by Music, that would have revealed the problem.

There’s a lot here I don’t understand. The folder I was originally looking at is the one set as the Music Media Location, and I guess the Music app decided to consolidate files there as I touched them. But only some of them. And why did it move some of them to the new /iTunes Music/Music folder in the first place (assuming that this happened when I upgraded from Mojave to Monterey and not some earlier upgrade)? And literally doing it only for random tracks within an album? (These are rhetorical questions, not ones I expect answers to.)

As I noted above, I am going to try to consolidate all files in this new Music folder after I clean out the other types of media, as you noted.

iTunes originally and I assume now Music.app can have the actual music files ANYWHERE that is accessible. What you see as the music lists in the app is all the music it knows about, but any track can be actually located anywhere. The folder you point to in Preferences is just where it will put any new files it ‘imports’.

The ‘Keep organised’ (or similar wording) pref. means whenever it needs to save a file, due to changes in metadata/tags etc, it will ensure that edited file is saved in the correct place according to the above Prefs location setting.

Everything otherwise just sits where it is. Until…

'Consolidate ’ will move selected files or whole library (depending on exact command) into the appropriate specified location without any need to make any changes to any file.

Also, whenever you ‘Get info’ on any track/file(s), it will check where it is supposed to be according to the Prefs setting and if it’s not there, will instantly move it there. Hence why some files may seem to randomly move just when looking at them (Get info) in iTunes/Music. However, it is not random.

The apps simply follow the rules that are entirely logical. Many complaints have been levelled at e.g. iTunes over the years but which were really just a lack of understanding by the user as to what iTunes was supposed to be doing and generally did very well indeed.

1 Like

Thank you for your comments.

I can say definitely that using Get Info on my system was not consistent in moving files. Some moved, some didn’t.

I plan to do a consolidation after I do some clean up and then make an archival backup.

Many thanks! This solved a problem for me. I noticed just a few days ago that most of my music library was missing when I opened Music on my iMac. It’s all there on my MacBook Pro and iPhone. I did a search for a missing album, and it appeared. Not exactly inside Music. My missing albums are all in my Public folder/iTunes Music. Now comes the ‘fun’ part: retrieval. I launched the album, and it appeared in the Music library, but only the first track. It looks like I have to choose each track one by one to get them back into Music.

“Import” the iTunes Music file into Music? (I think this screwed up music for me too by my never installing Catalina, where perhaps some merge occurred?) But now I can’t sync any music onto my iPad & iPhone, who both claim insufficient space. A PITA.

Thanks! That worked. I can’t remember if I installed Catalina on the iMac. It came with Mojave and stayed with it quite a while. It was stable, and my wife was using the iMac heavily during the pandemic. The MacBook Pro came with Catalina. Both are on Ventura now.

1 Like