Cheers for that - worked a treat!
Here's the way to do it for anyone else interested. Go to the thread linked to above, download and install SQL Viewer. Back-up your MM DB first before running any of these queries as you don't want to trash your DB and having nothing to go back to!
1. Find out the IDMedia of both the current and new locations. To find out the new location IDMedia (together with the current IDMedia locator), add a duplicate test track from the new (UNC) location. and run:
Code: Select all
select * from Songs where songtitle = "example song title"
2. Now we know the IDMedia, run the path change query:
Code: Select all
update Songs set SongPath = replace(SongPath, "<current location>", "<new location>") WHERE IDMedia = "<current IDMedia>"
e.g.
Code: Select all
update Songs set SongPath = replace(SongPath, "M:\", "\\SERVER\Music\") WHERE IDMedia = "63"
3. Update the IDMedia to the new location for all songs:
Code: Select all
update Songs set IDMedia = "<new IDMedia>" WHERE IDMedia = "<old IDMedia>"
That's it, worked great for me, and obviously useful no matter which locations are changing, whether it's a mapped drive to UNC or vice-versa etc...
Regards, Matt.
[quote="nohitter151"]I believe you can do it with this script: http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=24841 and that there are instructions on how to do it somewhere in the thread.[/quote]
Cheers for that - worked a treat!
Here's the way to do it for anyone else interested. Go to the thread linked to above, download and install SQL Viewer. Back-up your MM DB first before running any of these queries as you don't want to trash your DB and having nothing to go back to!
1. Find out the IDMedia of both the current and new locations. To find out the new location IDMedia (together with the current IDMedia locator), add a duplicate test track from the new (UNC) location. and run:
[code] select * from Songs where songtitle = "example song title"[/code]
2. Now we know the IDMedia, run the path change query:
[code]update Songs set SongPath = replace(SongPath, "<current location>", "<new location>") WHERE IDMedia = "<current IDMedia>"[/code]
e.g. [code]update Songs set SongPath = replace(SongPath, "M:\", "\\SERVER\Music\") WHERE IDMedia = "63"[/code]
3. Update the IDMedia to the new location for all songs:
[code]update Songs set IDMedia = "<new IDMedia>" WHERE IDMedia = "<old IDMedia>"[/code]
That's it, worked great for me, and obviously useful no matter which locations are changing, whether it's a mapped drive to UNC or vice-versa etc...
Regards, Matt.