Skip to content

cumulus13/dfind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” dfind - Duplicate File Finder

dfind.py is a command-line tool for finding duplicate files between two folders by comparing their SHA256 hashes. It uses the rich library to display progress and formatted output.

πŸ“¦ Features

  • Compares files in two folders recursively
  • Supports limiting search depth
  • Detects duplicates based on file content (hashes)
  • Optionally shows files that are unique to each folder
  • Beautiful terminal output with rich

πŸš€ Usage

python dfind.py folder1 folder2 [options]

Options

Option Description
-l, --max-depth Set maximum directory depth to scan
-u, --unique Show files that are unique to each folder

Examples

Compare two folders for duplicates:

python dfind.py /path/to/folder1 /path/to/folder2

Compare two folders but only up to 2 levels deep:

python dfind.py folder1 folder2 -l 2

Show duplicates and also list unique files:

python dfind.py folder1 folder2 --unique

πŸ“¦ Requirements

Install dependencies:

pip install rich psutil

🧠 How It Works

  1. Recursively collects file paths from both folders.
  2. Computes SHA256 hash of each file.
  3. Matches files with the same hash.
  4. Displays results in a rich-formatted table.

πŸ“ Output

  • Duplicate Files: Pairs of files with identical content.
  • Unique Files (optional): Files only found in one folder.

πŸ“œ License

MIT License

Author

Hadi Cahyadi

Coffee

Buy Me a Coffee

Donate via Ko-fi

Support me on Patreon

About

Duplicate File Finder

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages