Skip to content

a simple script that takes a source and destination directory to organize your music files

Notifications You must be signed in to change notification settings

hobbitronics/music-sorter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Music Organization Script

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.

Prerequisites

  • ffprobe (part of FFmpeg) must be installed.
  • Bash: Works on Unix-based systems (Linux, macOS).

Installation:

  1. Clone or download the script.
  2. Make it executable:
    chmod +x mv_organize_music.sh
  3. Run the script with source and destination directories:
    ./mv_organize_music.sh /path/to/source /path/to/destination

Usage:

./mv_organize_music.sh /path/to/source /path/to/destination

Arguments:

  • Source Directory: Defaults to the current directory if not specified.
  • Destination Directory: Defaults to ./organized.

Example:

./mv_organize_music.sh ~/Music ~/Music/Organized

Features:

  • 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.

Known Issues:

  • Files with long names may fail to move due to system restrictions.
  • Some special characters may still cause issues despite sanitization.

License:

MIT License. See LICENSE for more details.

About

a simple script that takes a source and destination directory to organize your music files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages