https://github.com/debjit018/media-organizer-md5
Organize images, videos, and audio files into year-based folders using EXIF metadata and MD5 checksums to prevent duplicates. Includes dry-run, logging, and automatic cleanup.
https://github.com/debjit018/media-organizer-md5
audio-organizer bash duplicate-file-removal exiftool file-management image-organizer md5 media-organizer shell-script video-organizer
Last synced: about 2 months ago
JSON representation
Organize images, videos, and audio files into year-based folders using EXIF metadata and MD5 checksums to prevent duplicates. Includes dry-run, logging, and automatic cleanup.
- Host: GitHub
- URL: https://github.com/debjit018/media-organizer-md5
- Owner: debjit018
- License: mit
- Created: 2025-06-30T07:13:11.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-30T07:39:48.000Z (about 1 year ago)
- Last Synced: 2025-06-30T08:35:28.501Z (about 1 year ago)
- Topics: audio-organizer, bash, duplicate-file-removal, exiftool, file-management, image-organizer, md5, media-organizer, shell-script, video-organizer
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Organize Media with MD5 Duplicate Detection
A powerful Bash script to organize your **images**, **videos**, or **audio files** into year-based folders using metadata โ while detecting duplicates using **MD5 checksums**.
โ
Supports EXIF-aware sorting
โ
Prevents duplicate files by content (MD5)
โ
Works recursively across folders
โ
Deletes empty directories automatically
โ
Dry-run mode for safe testing
---
## ๐ Features
- ๐ท Organize **Images**, ๐๏ธ **Videos**, ๐ต **Audio**, or **All**
- ๐ Uses `DateTimeOriginal`, `CreateDate`, or `FileModifyDate`
- ๐ง Automatically avoids duplicate content using **MD5 hashing**
- ๐งน Removes empty folders after sorting
- ๐งช `--dry-run` option available
- ๐ Logs everything in `organize_.log`
---
## ๐ฆ Requirements
Ensure these are installed:
- `bash`
- `exiftool` (for extracting timestamps)
- `md5sum`
- `find`
On Ubuntu/Debian:
```bash
sudo apt update
sudo apt install libimage-exiftool-perl
````
---
## ๐ง Usage
```bash
chmod +x media_organizer_md5.sh
./media_organizer_md5.sh /path/to/parent/folder [--dry-run]
./media_organizer_md5.sh /path/to/parent/folder
```
Youโll be prompted to choose:
```
1. Images
2. Videos
3. Audio
4. All (Images + Videos + Audio)
```
---
## ๐งช Example
```bash
./media_organizer_md5.sh /media/zz/CC70-D0--/Media_Backups/ --dry-run
```
โ Simulates moving your media into `/media/zz/CC70-D0--/Media_Backups/Images/YYYY`, etc., without changing anything.
---
## ๐ Folder Structure
```
ParentDirectory/
โโโ Images/
โ โโโ 2024/
โ โโโ 2024-05-20_14-22-31.jpg
โโโ Videos/
โ โโโ 2023/
โ โโโ 2023-11-02_18-07-00.mp4
โโโ Audio/
โ โโโ 2021/
โ โโโ 2021-08-19_10-05-12.mp3
```
---
## ๐ก๏ธ Duplicate Handling
Before moving a file, the script:
* Computes its **MD5 hash**
* Compares against existing files in the target folder
* Skips if identical content is already present
No clutter. No overwrite. Just smart moves.
---
## ๐ License
MIT License
---
## โจ Author
Developed by \[debjit018].
Feel free to fork, suggest improvements, or contribute!