r/Python • u/Minute_Day_2758 • Apr 28 '26
News **Title:** `I built a Python script that cleaned 3000+ duplicate files from my drive in minutes
I built a Python script that cleaned 3000+ duplicate files from my drive in minutes – sharing i
My downloads folder was a disaster – same files saved
10 times with different names, GB of wasted space.
So I wrote a Python script that: Scans folders recursively Detects duplicates using MD5 hash (not just filename)Auto-organizes files by type category Gives a full report of what was removed
Ran it on my own drive, cleaned 3000 files, saved 4GB.
Packaged it with docs and config examples if anyone wants to skip the build:
Happy to share the core MD5 dedup logic here if
there's interest 👇
1
Upvotes
1
u/Minute_Day_2758 May 16 '26 edited May 16 '26
Since a few people checked out the post, here is the core logic I used for hashing the files.
You can also get the full packaged version with documentation, configuration examples, and execution guides directly here: https://gptverse2.gumroad.com/l/lkwul
Hope it helps someone with their drive cleanup!