Skip to main content

Got bored in the first day of new semester and had to clean system for lot of copies of previous semester assignments and projects and notes, written this script to do the task for me

Project description

stress-relief

Got bored in the first day of new semester and had to clean system for lot of copies of previous sem assignments and projects and notes, written this script to do the task for me

Usage

python delete_copies.py <folder1> <folder2> <folder3> (and so on) <print/trash/delete>

You can enter as many folders as you can, but the script checks for just the mentioned folder and its child folders, it does not include parent folder

last arguments explanation:

print - just print the duplicate files

trash - deletes all the duplicate files in the folder and sends them to trash/recycle bin

delete - deletes the duplicate files permanently (cant be found in trash after this is executed, there is backup too in case this is just unfortunate command execution)

Note:

previous version code just checks for the name of the file instead of the actual content of the file which is what duplicate file means,

Executing the script did not caused any problem to me as I just copy the whole folder to another location instead of changing names of the files

And this error bounced back today while executing this on a folder with renaming the files which contains the same content inside

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

delete_copies-0.8.0.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file delete_copies-0.8.0.tar.gz.

File metadata

  • Download URL: delete_copies-0.8.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for delete_copies-0.8.0.tar.gz
Algorithm Hash digest
SHA256 4501c52df238e4e6f3660da20f8a6807e269c6761c48f2741d981ab7b01be594
MD5 43c79add233e760170d90195e50d561c
BLAKE2b-256 17d2e93ee295df33bd6f44ae74d70c7c66c4cd71f8fc6a99dd29f1da3cea7c86

See more details on using hashes here.

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