The Media Organizer MD5 project helps you manage your media files effectively. It organizes images, videos, and audio files into folders based on the year of creation. By using EXIF metadata and MD5 checksums, it ensures that duplicate files do not clutter your storage. This tool also includes a dry-run feature to preview actions before executing them, along with logging and automatic cleanup options.
You can download the latest release here.
- Year-based Organization: Automatically sorts media files into folders by year.
- Duplicate Detection: Uses MD5 checksums to identify and prevent duplicates.
- EXIF Metadata Support: Extracts metadata from images and videos for accurate sorting.
- Dry-Run Option: Preview actions without making changes.
- Logging: Keeps a record of actions taken for review.
- Automatic Cleanup: Removes empty folders and unnecessary files after processing.
To get started with the Media Organizer MD5, follow these steps:
-
Clone the Repository:
git clone https://github.com/RahmaMohammed-1/media-organizer-md5.git
-
Navigate to the Directory:
cd media-organizer-md5 -
Make the Script Executable:
chmod +x media-organizer.sh
-
Install Required Tools: Ensure you have
exiftoolinstalled. You can install it using:- For Debian/Ubuntu:
sudo apt-get install exiftool
- For macOS:
brew install exiftool
- For Debian/Ubuntu:
To use the media organizer, run the script with the desired options. Hereβs a basic command:
./media-organizer.sh /path/to/your/mediaReplace /path/to/your/media with the path to your media files.
--dry-run: Preview actions without executing them.--log: Specify a log file to save actions.--cleanup: Automatically remove empty folders after processing.
Example command with options:
./media-organizer.sh /path/to/your/media --dry-run --log=organizer.log --cleanupThe script scans the specified directory for media files. It extracts metadata using exiftool to determine the creation year of each file. It then organizes the files into folders named after their respective years.
MD5 checksums are calculated for each file to check for duplicates. If a duplicate is found, it will not be moved to the new folder.
The resulting directory structure will look like this:
/media
βββ 2020
β βββ image1.jpg
β βββ video1.mp4
βββ 2021
β βββ audio1.mp3
β βββ image2.jpg
The logging feature records every action taken by the script. This includes:
- Files processed
- Duplicates found
- Folders created
- Errors encountered
You can specify a log file using the --log option.
Example:
./media-organizer.sh /path/to/your/media --log=organizer.logThis command will create a log file named organizer.log in the current directory.
The automatic cleanup feature removes empty folders after processing. This helps keep your media directory tidy. To enable cleanup, use the --cleanup option.
Example:
./media-organizer.sh /path/to/your/media --cleanupContributions are welcome! If you would like to improve the Media Organizer MD5, follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Make your changes and commit them:
git commit -m "Add your feature" - Push to the branch:
git push origin feature/YourFeature
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions or issues, feel free to open an issue in the GitHub repository. You can also download the latest release here for updates and improvements.
For further assistance, please refer to the documentation within the repository.