This script organizes your music collection by moving audio files based on their metadata (Artist, Album, Title). It sanitizes file names for file system compatibility and can handle long file names and special characters.
- ffprobe (part of FFmpeg) must be installed.
- Bash: Works on Unix-based systems (Linux, macOS).
- Clone or download the script.
- Make it executable:
chmod +x mv_organize_music.sh
- Run the script with source and destination directories:
./mv_organize_music.sh /path/to/source /path/to/destination
./mv_organize_music.sh /path/to/source /path/to/destination- Source Directory: Defaults to the current directory if not specified.
- Destination Directory: Defaults to
./organized.
./mv_organize_music.sh ~/Music ~/Music/Organized- Sanitizes File Names: Replaces invalid characters (
:,/, etc.) with underscores. - Metadata-based Organization: Organizes files into Artist/Album/Title directories.
- Skips Existing Files: Files already in the destination are not moved.
- Files with long names may fail to move due to system restrictions.
- Some special characters may still cause issues despite sanitization.
MIT License. See LICENSE for more details.