Remove Duplicates
Utility to recursive search and move/delete duplicate files of the same size and context in specified folder.
If the storage folder (recycle_bin) is not specified, then duplicate files will be deleted! If the number of command line parameters is zero, then the search folder = current working folder.
Installation
Requires Python 3.8+.
pip install remove-duplicates
After installation use rmdup --help instead of remove_dup.
Command line parameters
-st, --start_folder Folder with which the recursive search begins.
-rb, --recycle_bin Optional folder for storing duplicate files (move file).
-log, --log_file Log file name.
-fnp, --fn_pattern File name pattern. Only files matching the pattern are processed!
Provides support for Unix shell-style wildcards. Default value is "*"
-nr, --not_recursively If this parameter is set, then recursive search is disabled!
Call example
rmdup --start_folder=E:\YoutubeChannelsCopy --recycle_bin=E:\reserved --log_file=E:\reserved\logfile.txt --fn_pattern="*.png"
How it works
- Files are enumerated recursively (unless
-nris set), only files matching the file name pattern are considered. - Files of equal size are compared by content (
filecmpwithshallow=False), so files with the same size and modification time but different content are never treated as duplicates. - Found duplicate copies are either moved to the storage folder (if
-rbis given) or deleted. - If the storage folder is located inside the search folder, it is skipped during the search.
- If a file cannot be accessed (permissions, race), it is skipped with a warning and the rest of the files are still processed.
Work log
Internationalization
Most of the program messages are translated into five languages: English, Russian, German, Spanish, French. If the language cannot be detected (e.g. C/POSIX locale), English is used by default. See: https://github.com/octaprog7/PyInternalization.
Development
Run the tests (unittest, no external dependencies):
python3 -m unittest discover -s tests -v
PyPi
Metadata
Release files for remove-duplicates 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| remove_duplicates-1.1.0.tar.gz | 16.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| remove_duplicates-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.2 kB
Release files / remove_duplicates-1.1.0.tar.gz
| Download URL | remove_duplicates-1.1.0.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a72ccffc3f506c658bb141b961d09263c369549b375d84fcb50e9f4ef32dc1a9
|
|
BLAKE2b-256 checksum How to use checksums |
81c6ebdb8f0f6030bc6519008893be57b5f7a22e6e75769f0aa8580e851416fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / remove_duplicates-1.1.0-py3-none-any.whl
| Download URL | remove_duplicates-1.1.0-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6190cc7725b15e99cfe91c831d7052af071f681fdcba20f2375610b365a8702d
|
|
BLAKE2b-256 checksum How to use checksums |
5dc5097601a0de731fc92427454abb929e0631c6dd67cf1bdbae6c1c8603879a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for remove-duplicates 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.