DhanushNehru / Python-Scripts

A curated list of python scripts for automating your tasks
https://dhanushnehru.github.io/Python-Scripts/
MIT License
560 stars 262 forks source link

Enhance Duplicate Finder with File Type Filtering and Report Generation #327

Closed Stonebanks-js closed 1 month ago

Stonebanks-js commented 1 month ago

Description:

_This pull request introduces two significant enhancements to the duplicatefinder.py script:

File Type Filtering:

  1. Users can now specify a file type filter to limit duplicate detection to certain file types, improving efficiency and precision.

  2. Report Generation:

  3. The script now generates a comprehensive report of detected duplicates and saves it to a duplicates_report.txt file. The report includes details of all duplicate files found, making it easier to review and manage duplicates.

Changes:

Tests:

  • Tested on directories containing images, documents, and other files.
  • Verified that the filtering works correctly by scanning only for .jpg and .png files.
  • Confirmed that the report is generated with correct paths for all detected duplicates.

How to test:

Run the script and specify a directory to scan for duplicates. Provide a file type extension when prompted to filter files (e.g., .jpg). Select either "delete" or "move" as an action for managing duplicates. Check the generated duplicates_report.txt for detailed information on found duplicates.

Additional Notes:

Stonebanks-js commented 1 month ago

@DhanushNehru Take a look into it and assign hacktoberfest labels to it