Skip to main content

Duplicate files remover

Project description

# dupfilesremover

Tool for duplicate files removing.

Removes duplicate files existing with same or different name in on one or more folder(s).

For example, I do backups of my photos over multiple devices, and sometimes I can have same photo copied multiple times. It can happen when I move photo from one folder to another.

This tool, helps me find duplicates of a same file, when it’s stored in multiple folders or there are multiple copies in a same folder but with a different names.

## Use case

For example, let’s assume that same image available (with different names) in:

  • Folders data1, data2 and data3

  • Sub-folders of any of these folders (for example data1/new images/best)

We want to remove all duplicates and follow these rules:

  • Recursively remove all duplicates and save only one file

  • In case if duplicates will be in same folder - save file with the shortest name

  • Save images from data1 folder (or sub-folders of data1 in case if identical files also available in data2 and data3)

  • In case if file will be found in any of data1 sub-folders save with the shortest path

To do this we may just run:

` python -m dupfilesremover --recurse .\data1 .\data2 .\data3 `

Basically the folders order in the command line will define priorities of the copies if more than one will be found. As a result, data1 will have the highest priority and inside data1 files with shorter file name and shortest path will have precedence.

## How to install

You can install from PyPi just by using:

` pip install dupfilesremover `

Or you can install from GitHub by using pip:

` pip install git+https://github.com/JFF-Bohdan/dupfilesremover `

Or just clone and install from source code:

` git clone https://github.com/JFF-Bohdan/dupfilesremover.git cd dupfilesremover python setup.py install `

## Usage

You can use tool like:

`shell dupfilesremover --recurse tmp/folder1 tmp/folder2 tmp/folder3 `

In this example we are going to analyse folders tmp/folder1, tmp/folder2 and tmp/folder3 for duplicate files and remove them.

If you would like to perform dry-run (no action files removal, just analysis), you can use:

`shell dupfilesremover --dry-run --recurse tmp/folder1 tmp/folder2 tmp/folder3 `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dupfilesremover-0.3.0.6.tar.gz (16.4 kB view details)

Uploaded Source

File details

Details for the file dupfilesremover-0.3.0.6.tar.gz.

File metadata

  • Download URL: dupfilesremover-0.3.0.6.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for dupfilesremover-0.3.0.6.tar.gz
Algorithm Hash digest
SHA256 e34e38196aa9ade365d3d56204daf815b2037e1280c55530c96f53778bce782f
MD5 7c9fede724f654f9b2a901b21a311a73
BLAKE2b-256 417282e62df0423aed0b5e19b3e50c0e57f4574abb30aaf60a6f8b0bc2fa7710

See more details on using hashes here.

Provenance

The following attestation bundles were made for dupfilesremover-0.3.0.6.tar.gz:

Publisher: test_and_release.yml on JFF-Bohdan/dupfilesremover

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page