Author Topic: Missing Files: Relink Music File Paths, Locate Missing Files (and Prevention)  (Read 3117 times)

tjinc

  • Sr. Member
  • ****
  • Posts: 866
Occasionally music tracks can go 'missing'. This happens when the path to a file that MusicBee has stored in its database differs from the actual path on your computer. This is often caused by moving files outside of MusicBee, for example in Windows Explorer or another third party application, but can also occur when moving your library to a new PC and storing your music files in a different location (maybe when using a new username).

When MusicBee identifies a track as 'missing' it will set an 'exclamation mark' indicator to the left of the track. If you place your mouse pointer over this, then details of the issue will be displayed in a pop-up:



MusicBee provides a couple of tools to help in this situation:


Relink Music File Paths

Found in File > Library menu, this is a tool typically, but not solely, used when you have moved all your music files to a different folder or new drive. It will change all the links in the MusicBee database from 'folderpath-old' to 'folderpath-new'. This will ensure that all the music files and the playlists are updated with the new files paths.
  • No files will be moved or renamed (only the links in the library database are updated).
  • This will update every occurrence of  'folderpath-old' so should not be used when trying to relink individual files.

Example:
Your music files are currently stored in: C:\Users\Username\Music\<Album Artist>\<Album>\<Filename>
You buy a new drive (D:\) and move all your music files to D:\Libraries\Music\<Album Artist>\<Album>\<Filename>

Obviously when you restart MusicBee, it will not be able to find your music files. Relink Music File Paths can now be used to tell MusicBee where all the files are now located:



When you press the Update button, MusicBee will search through its database and change any occurrence of 'C:\Users\Username\' and replace it with 'D:\Libraries\'
(This is essentially a kind of 'search and replace' function.)

IMPORTANT - For this process to run successfully:
  • The old folder location ('map music file path from') must still exist on your system. (AS FROM VER 3.6.9065 THIS IS NO LONGER NECESSARY)
  • The rest of your folder structure and filenames (i.e. the Music\<Album Artist>\<Album>\<Filename> part) must remain identical.

Relink Music File Paths is not a tool for locating individual files - to do this use:


Locate Missing Files

To find individual missing tracks or albums you can use the Locate Missing Files tool. This is found in the Tools menu. This tool scans the tracks displayed in the main panel for missing files and displays them in this window:


There are then two available options:
  1. Start Auto-Match: This searches the PC for matching tracks based on filename, then on Track and Artist tags plus filesize. (Limited personal experience suggests that this rarely finds the required files.)
  2. Manual Location: This opens an explorer window allowing you to locate the track manually. It will then attempt to match other missing files in the same folder (single level only), again based on filename, then on Track and Artist tags plus filesize.

With both of these options a summary is displayed before any changes are made. Select Proceed to apply the changes.


Preventing Files Going Missing

Obviously it is always better not to get to the point where you are trying to locate missing files. If you do need to keep moving files after adding to your MusicBee library then the best way is to use MusicBee tools to do the moving:

  1. Use the Computer node:
     This can be found in the Navigator panel and acts in a similar(ish) way to using Windows Explorer.

 

  2. Use the Send To > Folder(Move)
      This tool is found in the right-click context menu. Here you can choose whether to send selected files to a specific folder or to an 'organised' folder based on tag data.
 
Both of these methods will ensure that MusicBee retains the correct folderpath information.
Last Edit: January 25, 2025, 09:34:53 AM by tjinc

matodyne

  • Newbie
  • *
  • Posts: 1
Thanks for this info.

A note for people importing their library from iTunes that applies when some of the imported songs are missing files: re-locating files will wipe out the ratings of those songs, because the rating is stored in the database but MusicBee will read the rating from the newly-found file, which is unset if coming from iTunes.

My solution is adapted from the method described by roth377 (https://getmusicbee.com/forum/index.php?topic=36650.0) to re-apply the ratings after locating the files.

Steps:
1. Create auto playlist that selects all songs with rating of X (repeat for X = 1 through 5).
2. Copy the songs into a static playlist (in hindsight, auto playlists have an option to disable "automatically refresh" which may have done just as well)


3. I was fine with modified date of all files changing, so I didn't disable, but you decide.
4. Use `Relink Music File Paths` on some files, where applicable, and `Locate Missing Files` on others.
5. Go into each rating playlist created in step 2, and apply the appropriate rating. How: Select all, right click, Rating > X Star.  This sets the rating again and also writes the rating to each file's metadata (tag).

I noted that play count was preserved through all this.

If you're wondering, the reason I had missing files was because I'm on a new computer using different filepaths.