Just did this again, very useful for copying music files from my laptop to my netbook. Things like this are what I love about Linux. So I'm posting it again.
I usually use the 2nd command which numbers the playlist items. It's far too easy IMO to hit the wrong thing in media players and mess up the order. Numbering makes it easy to recover.
Export your playlist to a m3u file. I called it playlist.m3u here, don't just blindly copy/paste this stuff. This is why I didn't ember the strings in <code> tags.
Open a terminal in the folder where you have saved the file.
Copy & paste this:
sed "s/#.*//g" < playlist.m3u | sed "/^$/d" | while read line; do cp "${line}" '/path/to/output/folder/'; done
Modified so that files are renamed according to their position in the playlist:
sed "s/#.*//g" < playlist.m3u | sed "/^$/d" | while read line; do (( COUNTER++ )); filename="${line##*/}"; cp "${line}" "/path/to/output/folder/$COUNTER - $filename"; done
Want to copy a playlist, try this
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Want to copy a playlist, try this
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken