TrackSync is a Python-based tool designed to merge and organize music files from two folders while preserving track order, avoiding duplicates, and handling renumbering automatically. It is particularly useful for cases where playlists have been updated, and some tracks were deleted or reordered.
The tool prioritizes one folder (the priority folder) as the source for the correct order and fills in any gaps using files from the secondary folder.
- Preserve Track Order: Maintains numbering from the priority folder while integrating unmatched tracks from the secondary folder.
- Avoid Duplicates: Matches tracks based on metadata (title, artist) or filename similarity to prevent duplicates.
- Unicode Support: Handles filenames with Chinese characters and other Unicode text.
- Dynamic Output Folder: Creates the output folder in the same directory as the priority folder.
- Renumber Tracks: Ensures consistent filenames like
Track 001,Track 002, etc. - Error Handling: Skips files with missing metadata and logs warnings.
- Non-Destructive: Files are copied, not moved, leaving the original folders unchanged.
- Python 3.6 or later
- Required Libraries:
pip install mutagen
- Download the standalone executable from the Releases.
- Double-click
gui_tracksync.exeto launch the GUI. - Follow the on-screen instructions to merge your playlists.
- Ensure you have Python 3.6 or later installed.
- Install the required library:
pip install mutagen
python tracksync.pyExample:
Enter the path to the priority folder: "C:\Music\FavPlaylist1"
Enter the path to the secondary folder: "C:\Music\FavPlaylist2"
Enter the output folder name: unified
The output folder will be created inside the priority folder's directory:
C:\Music\unified
- Extracts track numbers, titles, and artists from audio files using
mutagen. - Skips invalid or unreadable files.
- Matches tracks based on metadata similarity and filename comparisons.
- Prioritizes the priority folder but fills gaps using the secondary folder.
- Renumbers tracks sequentially to resolve conflicts and ensure order consistency.
- Copies matched and unmatched files into the output folder with new filenames (e.g.,
Track 001 - Song.mp3).
Enter the path to the priority folder: C:\Music\Playlist1
Enter the path to the secondary folder: C:\Music\Playlist2
Enter the output folder name: unified
Loading priority folder...
Loading secondary folder...
Matching tracks and preserving priority order...
Renumbering and copying files to output folder...
Copied: Loving Caliber - Scared Of Heights.mp3 -> Track 001 - Loving Caliber - Scared Of Heights.mp3
Copied: Modern Talking - Cheri Cheri Lady (Lyrics).mp3 -> Track 002 - Modern Talking - Cheri Cheri Lady (Lyrics).mp3
Copied: You're A Woman, I'm A Man (Lyrics Video) - Bad Boys Blue.mp3 -> Track 003 - You're A Woman, I'm A Man (Lyrics Video) - Bad Boys Blue.mp3
Copied: Shania Twain - I'm Gonna Getcha Good! (Red Version) (Official Music Video).mp3 -> Track 004 - Shania Twain - I'm Gonna Getcha Good! (Red Version) (Official Music Video).mp3
Copied: SLANDER - Love Is Gone ft. Dylan Matthew (Acoustic).mp3 -> Track 005 - SLANDER - Love Is Gone ft. Dylan Matthew (Acoustic).mp3
Process completed successfully!
Since this application is a portfolio project and not a commercially distributed product, the .exe file is not signed with a digital certificate.
As a result, you may encounter a Windows SmartScreen warning when running the executable.
- Click More info in the warning dialog.
- Select Run anyway to execute the application.
The application is safe to use, and you can verify its integrity by reviewing the source code available in this repository.
- Logs warnings for files missing metadata.
- Processes all valid files while skipping problematic ones.
- Replaces invalid characters in filenames (e.g.,
?,*) to avoid filesystem errors. - Skips unreadable files but continues processing others.
- Matches based on metadata similarity, so files without metadata may not match correctly.
- Does not support nested folders—all tracks must be in the top-level directory.
- Logs: Add detailed log files for errors and actions taken.
- Progress Bars: Display status for long playlists.
- More Formats: Expand to support video files or additional audio formats.
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to add.
This project is licensed under the MIT License.
For issues or questions, feel free to open an issue on the GitHub repository.






