PDA

View Full Version : New Drive - what to do with playlists?



pablolie
2011-07-24, 21:59
anyone has any suggestions on how to most effectively migrate playlists? I have a Linux system, it keeps drive names in the playlists as a reference. I guess I should have thought about it when naming my drives... :D

erland
2011-07-25, 00:14
anyone has any suggestions on how to most effectively migrate playlists? I have a Linux system, it keeps drive names in the playlists as a reference. I guess I should have thought about it when naming my drives... :D

Can't you just use "Replace all" in a text editor or sed to change drive name part of the path in the playlist files to the new drive name ?

Fozzy
2011-07-25, 09:54
Indeed a short piece of shell script and you can do it easily. My library is on a NAS that runs Linux and the playlists are in /Qmultimedia/Music/playlists so:

cd /Qmultimedia/Music/playlists
for file in *.m3u
do
sed -e 's!/Qmultimedia/!/bigdisk/!' < "$file" > "$file".new && mv "$file".new "$file"
done

The line beginning with sed is all one line, the next line starts with the word done. The example above deals with moving the library from /Qmultimedia to /bigdisk so you'd need to subsitute your own disk names here.