A command-line file management toolkit: duplicate detection, directory comparison, MD5 inventories, empty-directory cleanup, and a SQLite index for large collections.
pip install md5explorerOr, from a local checkout:
pip install -e .# Detect duplicates (read-only)
md5explorer scan duplicates ./photos
# Simulate deletion, keeping the newest file of each group
md5explorer scan duplicates ./photos --delete --dry-run --keep newest
# Compare two directories
md5explorer scan compare ./dir1 ./dir2
# Generate an MD5 inventory
md5explorer scan inventory ./photos -o inventory.txt
# Index a large tree into SQLite (multiprocess)
md5explorer db index ./photos
# Compare a new folder against the index
md5explorer db compare ./incoming --delete --dry-runRun md5explorer --help, md5explorer scan --help, or md5explorer db --help for
the full option list.
| Group | Subcommand | Purpose |
|---|---|---|
| scan | duplicates |
Detect and optionally delete duplicate files |
| scan | compare |
Compare two directories file by file |
| scan | inventory |
Write an MD5/name/date/path inventory to a text file |
| scan | diff-lists |
Diff two inventory files by MD5 |
| scan | empty-dirs |
Detect and optionally delete empty directories |
| db | index |
Index a directory into the SQLite database |
| db | list |
List entries from the database |
| db | check |
Check if a file is present in the database |
| db | compare |
Compare a directory against the indexed catalog |
pip install -e ".[dev]"
pytest
ruff check src
mypy srcMIT - see LICENSE.
