https://github.com/tjaart-code/delete-duplicate-images
a script for deleting duplicate images
https://github.com/tjaart-code/delete-duplicate-images
duplicate-images python3
Last synced: about 1 year ago
JSON representation
a script for deleting duplicate images
- Host: GitHub
- URL: https://github.com/tjaart-code/delete-duplicate-images
- Owner: tjaart-code
- License: gpl-3.0
- Created: 2024-10-08T15:42:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-18T09:00:20.000Z (over 1 year ago)
- Last Synced: 2025-02-18T09:37:50.795Z (over 1 year ago)
- Topics: duplicate-images, python3
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Delete Duplicate Images (on Linux)
### How It Works:
1. **Hash Function**: The script reads the content of each file and calculates its MD5 hash.
2. **Walking Through the Directory**: It recursively scans through the specified directory and its subdirectories for image files.
3. **Check for Duplicates**: For each image, it checks if the hash has already been encountered. If so, the script deletes the duplicate file.
4. **File Extensions**: The script checks for common image file extensions like .png, .jpg, .jpeg, .gif, bmp, tiff, webp. (You can add more extension types)
### How To Run:
1. In your terminal run: ```python3 imgDelete.py```
2. You will be asked to input your directory full path e.g. ```/home/user/Pictures/my-folder```