The script finds files with equal name and size or with hash comparison in a target directory.
Run the script with absolute path to the target directory for basic comparison. For comparison files by hash, add optional argument --md5 True
.
By default optional argument --md5
is False
.
Equal name and size:
python duplicates.py /some/path
Hash comparison:
python duplicates.py /some/path --md5 True
File name: filename
Path: /some/path/dir/filename
Path: /some/path/other_dir/filename
==========================================================
The code is written for educational purposes. Training course for web-developers - DEVMAN.org