Skip to content

[Good First Issue] Add File Duplicate Detection #9

@SthembisoMfusi

Description

@SthembisoMfusi

🎯 Issue Description

Detect and handle duplicate files during organization to avoid overwriting.

🚀 What You'll Learn

  • File hashing
  • Duplicate detection algorithms
  • User interaction

📋 Tasks

  • Calculate file hashes (MD5 or SHA256)
  • Compare files before moving
  • Ask user what to do with duplicates
  • Add options: skip, rename, overwrite
  • Show duplicate file information

🛠️ Files to Modify

  • py_sort.py

💡 Hints

  • Use hashlib for file hashing
  • Read files in chunks for large files
  • Provide clear duplicate information

🧪 Testing

# Create duplicate files
cp file1.txt file1_copy.txt
python py_sort.py ~/Downloads

📚 Resources

❓ Questions?

Feel free to ask questions in the comments or start a discussion!

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions