🎶 Copy music files in a playlist for export 💿
Copy your mp3s, in order, from an m3u playlist into a directory for export.
These scripts will:
Collect files in your music playlist
Order the songs
Copy them into a new directory.
Now can burn your collection to a CD, or send the playlist to friends. 👍
Using copy-m3u-playlist-files-to-directory
The script can, optionally, take two arguments:
The name of the m3u playlist file.
The location to place the contents of the playlist.
If neither is specified, the script defaults to
playlist.m3uandcurrent working directory.
Usage Examples
Download on Linux
You can download the Bash version of this script here:
1
wget https://raw.githubusercontent.com/MarcusHoltz/copy-m3u-playlist-files/main/copy-m3u-playlist-files-to-directory.sh
Running on Bash
Using the bash version of this script, run the script with:
1
bash copy-m3u-playlist-files-to-directory.sh name-of-playlist.m3u /home/user/Music/somefiles
Download on Windows
You can download the Powershell version of this script to a specified directory with a command like:
1
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/MarcusHoltz/copy-m3u-playlist-files/main/copy-m3u-playlist-files-to-directory.ps1" -OutFile "C:\path\to\destination\somefolder\copy-m3u-playlist-files-to-directory.ps1"
Running on Windows Powershell
Using the Powershell version of this script you just downloaded, run the Powershell script with:
1
2
Unblock-File .\copy-m3u-playlist-files-to-directory.ps1
copy-m3u-playlist-files-to-directory.ps1 name-of-your-playlist.m3u C:\path\to\destination\somefolder\ -SkipMissing -Verbose
Download using Python
To download the Python version, with more Python…
Create and run this python script to download the file:
1
2
3
4
5
6
7
import urllib.request
url = "https://raw.githubusercontent.com/MarcusHoltz/copy-m3u-playlist-files/main/copy-m3u-playlist-files-to-directory.py"
response = urllib.request.urlopen(url)
with open("copy-m3u-playlist-files-to-directory.py", "wb") as file:
file.write(response.read())
Running the Python script with Python
To run the downloaded Python script:
1
python3 copy-m3u-playlist-files-to-directory.py name-of-your-playlist.m3u /path/to/destination
Thanks!
You can find more information about this repo at:
