📁 File Management

Duplicate File Finder and Cleaner

Automatically find and remove duplicate files to free up disk space

★★☆ Intermediate 10-15 min January 12, 2025

Overview

Over time, computers accumulate numerous duplicate files that take up valuable disk space. Claude can help you quickly find duplicate files by comparing file sizes, MD5 hash values, and other methods to accurately identify identical files, and assist you in safely cleaning them up.

Use Cases

  • Clean duplicate downloads in the Downloads folder
  • Organize photo libraries by removing duplicate photos
  • Clean up duplicate documents from multiple backups
  • Free up disk space and improve system performance

Steps

Step 1: Scan for Duplicate Files

Specify the directory to scan, and Claude will find all duplicate files.

Please scan the ~/Downloads folder to find all duplicate files. Use MD5 hash values to determine if files are identical, and list results sorted by file size.

Step 2: Analyze Duplicate File Report

Claude will generate a report showing information for each group of duplicate files.

For the duplicate files found, please generate a detailed report:
- Number of files in each duplicate group
- File size and total space occupied
- Full file paths
- Last modification time
And tell me how much space can be freed in total

Step 3: Smart Retention Strategy

Let Claude help you develop a cleanup strategy, keeping the most appropriate version.

For each group of duplicate files, please keep one copy according to these rules:
1. Prioritize keeping files in the Documents folder
2. If none are in Documents, keep the most recently modified
3. If modification times are the same, keep the one with shortest path
Please list the files recommended for deletion

Step 4: Safe Deletion

Before deleting, you can first move files to a temporary folder.

Please don't delete directly, instead:
1. Create a ~/DuplicateBackup folder
2. Move files recommended for deletion to that folder
3. Generate a detailed list including original paths and new paths
This way I can review before deciding whether to permanently delete

Warning: Always confirm before deleting files! It's recommended to move to a backup folder for review first, then permanently delete after confirming everything is correct. Some seemingly duplicate files may have special purposes in different locations.

Tip: For photos and videos, you can ask Claude to additionally check EXIF information to ensure you don't accidentally delete similar photos taken at different times or locations.

Common Questions

Q: How do I know if two files are truly identical? A: Claude uses file size and MD5/SHA256 hash values to determine this. Identical hash values mean the file content is exactly the same, even if the filenames are different.

Q: Will important files be accidentally deleted? A: Following the steps above, files will first be moved to a backup folder rather than directly deleted. You have ample time to review and confirm before permanent deletion.

Q: Can certain folders be excluded? A: Yes. When scanning, explicitly tell Claude to exclude specific directories, such as "scan Downloads, but exclude the Important subfolder".