An open API service indexing awesome lists of open source software.

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.

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!