Changing file locations on a large scale
Posted: Tue Aug 19, 2025 10:06 am
I'm posting these here so that nobody else has to go down the same rabbit hole that I did in order to change their file locations en masse. I wish someone had posted something like this here to save me a couple of lost hours. But I'm still baffled that MediaMonkey doesn't have a method to allow you to update your file's SONGPATH if you've moved your song library to a new location.
So my system died, and I build a new one and FOOLISHLY used a different name for my PC. I installed MediaMonkey and of course all the file locations are now incorrect in my DB because they were pointing to the old server (I was using UNC, but this applies to mapped drives too). I did some searching to see how I could change these, and the only thing I could find was an addon that would update your file locations. I was willing to pay for it, but it required a PayPal account, which I do not have.
So I tried researching a bit more and found that the MM database is just an SQLlite DB, so I figured I could just run an update to change all of my file location strings, but when I tried using a tool like SQLLiteStudio, I just kept getting "no such collation sequence: IUNICODE" and I found out that it's due to how the MM DB is set up. So I figured that was a dead end as I didn't want to mess around with the DB structure.
I did a bit more digging and found that there was an "SQL Editor" plug in for MediaMonkey! I figured if I could perform updates through this editor, I was set, which it did! So, if you want to essentially do an "add/replace" on your file paths, just:
BACKUP YOUR DATABASE FIRST IN CASE YOU MESS SOMETHING UP! ("File" -> "Database" -> "Backup")
1) Go to "Tools" -> "Addons" and search for "SQL Editor" and install it and let MM restart.
2) You'll see a new "SQL Editor" icon on the top right that looks like a program window, click on that to open the editor.
3) Run:
UPDATE Songs SET SONGPATH = REPLACE(SONGPATH, '\\server1', '\\server2')
replacing the first string with the one you want to replace and the second string with what you want to replace it with
4) Run:
select SONGPATH from songs
to verify that everything was updated correctly
That's it! One important thing to mention is that it will always return "0 records updated" which is odd, and it had me thinking that it wasn't actually working until I ran the select to verify, so don't despair if you see that. Another thing is that if you have files stored in different locations, you might want to add a WHERE clause on your UPDATE, like
UPDATE Songs SET SONGPATH = REPLACE(SONGPATH, '\\server1', '\\server2') WHERE SONGPATH LIKE '\\server1%';
So you don't mess up your files in other locations (you may want to play around with the WHERE clause in a SELECT first before executing the UPDATE to verify it's returning the right records you want to update. Good luck!
TL;DR: To update all/many of your file locations at once, install the SQL Editor addon and run an UPDATE with a REPLACE() on the SONGPATH field.
So my system died, and I build a new one and FOOLISHLY used a different name for my PC. I installed MediaMonkey and of course all the file locations are now incorrect in my DB because they were pointing to the old server (I was using UNC, but this applies to mapped drives too). I did some searching to see how I could change these, and the only thing I could find was an addon that would update your file locations. I was willing to pay for it, but it required a PayPal account, which I do not have.
So I tried researching a bit more and found that the MM database is just an SQLlite DB, so I figured I could just run an update to change all of my file location strings, but when I tried using a tool like SQLLiteStudio, I just kept getting "no such collation sequence: IUNICODE" and I found out that it's due to how the MM DB is set up. So I figured that was a dead end as I didn't want to mess around with the DB structure.
I did a bit more digging and found that there was an "SQL Editor" plug in for MediaMonkey! I figured if I could perform updates through this editor, I was set, which it did! So, if you want to essentially do an "add/replace" on your file paths, just:
BACKUP YOUR DATABASE FIRST IN CASE YOU MESS SOMETHING UP! ("File" -> "Database" -> "Backup")
1) Go to "Tools" -> "Addons" and search for "SQL Editor" and install it and let MM restart.
2) You'll see a new "SQL Editor" icon on the top right that looks like a program window, click on that to open the editor.
3) Run:
UPDATE Songs SET SONGPATH = REPLACE(SONGPATH, '\\server1', '\\server2')
replacing the first string with the one you want to replace and the second string with what you want to replace it with
4) Run:
select SONGPATH from songs
to verify that everything was updated correctly
That's it! One important thing to mention is that it will always return "0 records updated" which is odd, and it had me thinking that it wasn't actually working until I ran the select to verify, so don't despair if you see that. Another thing is that if you have files stored in different locations, you might want to add a WHERE clause on your UPDATE, like
UPDATE Songs SET SONGPATH = REPLACE(SONGPATH, '\\server1', '\\server2') WHERE SONGPATH LIKE '\\server1%';
So you don't mess up your files in other locations (you may want to play around with the WHERE clause in a SELECT first before executing the UPDATE to verify it's returning the right records you want to update. Good luck!
TL;DR: To update all/many of your file locations at once, install the SQL Editor addon and run an UPDATE with a REPLACE() on the SONGPATH field.