This Python script parses a Rekordbox XML export file, locates each track by TrackID
, and copies the tracks into subfolders organized by playlist. It’s particularly useful for DJs and music enthusiasts who want to arrange tracks on disk by playlist structure from Rekordbox.
- Parses Rekordbox XML files to extract playlists and track locations.
- Creates a folder for each playlist and copies the corresponding tracks.
- Supports recursive playlists (sub-playlists).
- Compatible with macOS.
- Python 3.x
- Modules used:
xml.etree.ElementTree
,os
,urllib.parse
,shutil
-
Clone the Repository:
git clone https://github.com/TurboKach/rekordbox-xml-to-file.git cd rekordbox-xml-to-file
-
Ensure Python 3 is Installed: Check your Python version:
python3 --version
-
Run the Script: Execute the script with:
python3 main.py
The script will prompt for:
- Path to Rekordbox XML file: Full path to the XML export file from Rekordbox.
- Output Directory: Directory where playlist folders and copied tracks will be created.
-
Run the Script:
python3 main.py
-
Input Paths:
Enter the full path to your Rekordbox XML file: /Users/{**yourusername**}/Documents/rekordbox.xml Enter the full path to the output directory: /Users/{**yourusername**}/Music/RekordboxPlaylists
The script will create a folder for each playlist within the specified output directory and copy the relevant tracks into each folder.
If your Rekordbox XML file contains the following playlists:
House
Techno
Acid Techno
(sub-playlist)
The output directory will look like:
/Users/yourusername/Music/RekordboxPlaylists/
├── House/
│ ├── track1.mp3
│ └── track2.mp3
├── Techno/
│ └── Acid Techno/
│ ├── track3.mp3
│ └── track4.mp3
- File Not Found Warnings: If you see warnings about missing files, ensure that the paths in your Rekordbox XML file are valid and accessible on your system.
- Empty Folders: If no files are copied to the playlist folders, verify that the playlist structure and
TrackID
associations in your XML file are correct.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/my-feature
). - Commit your changes (
git commit -m 'Add my feature'
). - Push to the branch (
git push origin feature/my-feature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.