How to Find and Delete Duplicate Files in Windows

Over time, you may accumulate duplicate files or imported photos on your hard disk due to mismanagement or accidental copying to another location. In some situations, the duplicate files or photos may have completely different names than the original. How do you find duplicate files or photos on your hard disk and remove them to free up the disk space?

This article explains how to find and remove duplicate files or photos on a Windows computer.

Find and Delete Duplicate Files in Windows

There are several utilities and methods to find duplicate files and photos imported from the camera. Let’s start off with the popular CCleaner utility.

1. Using CCleaner to find and delete duplicate files

CCleaner is a very popular utility that cleans up the browser cache, junk files, and obsolete registry entries. It also has an option to find and remove duplicate files on your computer. You can find duplicate files by matching the file name, size and date modified parameters. But, a more effective method would be to compare file contents.

  1. Download CCleaner and install it.
  2. Run CCleaner, click Tools and click Duplicate Finder
  3. CCleaner duplicate finder can match by Name, Size, Modified date, or by Content. If the duplicate files are of different names than the original, uncheck Name and choose Content matching in the Match by options. If you tick the Content option, then CCleaner will use MD5 hash checksum to verify the file content.
    find and delete duplicate files in windows - ccleaner
  4. By default, it’s configured to search the entire drive — i.e., all partitions. To limit the searches to specific folder locations, uncheck the drive-letters in the Include tab.
  5. Click Add to include specific folder locations.
  6. Browse to locate, or type the folder path.
  7. Select the file types to search — e.g., *.png
    find and delete duplicate files in windows - ccleaner
  8. To search the folder recursively (in sub-folders), choose Include files and subfolders option, and click OK.
  9. Likewise, add the other folder locations where you think the duplicate files exist.
  10. Once done, click on the Search button in the CCleaner’s Duplicate Finder screen.

It finds duplicate files (based on file contents, as per our chosen option) and shows the identical files list.

find and delete duplicate files in windows - ccleaner

From that screen, you can select the duplicate files and delete them, or export the entire list to a text file.


2. Using HashMyFiles to find and delete duplicate files

HashMyFiles utility from Nirsoft allows you to calculate the hashes of one or more files in your system. HashMyFiles can compute file hashes using MD5, SHA256, SHA384, SHA512 algorithms. The checksum is a hash value used for performing data integrity checks on files or comparing files in two or more folders. Hash checksum is a kind of signature for a file. The HashMyFiles utility can also highlight identical or duplicate files based on the file hash.

RELATED: Compare the contents of two folders using HashMyFiles tool (hash checksum comparison)



MD5 hash comparison is suitable in most cases. But as collisions are rarely possible with MD5 or SHA-1 algorithm, mission-critical production environments prefer SHA-256 hash comparison. Note that MD5 is faster and less resource-intensive than SHA-1 and SHA-256. Refer to Speed Comparison of Popular Crypto Algorithms. For most home users, MD5 should be enough.

The following example uses SHA-256. Feel free to change the algorithm as desired.

Follow these steps to find and delete duplicate files using HashMyFiles:

  1. Download HashMyFiles, unzip and run the utility.
  2. From the Options menu, choose SHA-256 and deselect all other hash algorithms.
    compare files in two folders - hashmyfiles
  3. Click View → Choose Columns
  4. In the Column Settings, select the SHA-256, Full Path and Full Size columns, and click OK.
    compare files in two folders - hashmyfiles
  5. From the File menu, click Add Folder
  6. Add as many folder locations you want to search for duplicate files. You can even select an entire drive.
    find and delete duplicate files in windows - hashmyfiles
  7. To add more locations, click Add Folder from the File menu again. Enable the Add files in subfolders option for a recursive search.find and delete duplicate files in windows - hashmyfilesHashMyFiles computes the SHA-256 file hash checksums for files in the selected folder locations.
  8. From the Options menu, enable Mark Identical Hashes to highlight identical files in the same color.
  9. Sort the listing by SHA-256 to order the entries so that the duplicates can be easily identified.find and delete duplicate files in windows - hashmyfiles
  10. To delete the duplicate items, select the items one by one, and press Shift + Ctrl + Del. To send them to the Recycle Bin instead of deleting permanently, press Shift + Del. Alternately, you can use the options Delete Selected Files or the Move To Recycle Bin from the File menu.find and delete duplicate files in windows - hashmyfiles

3. Using SearchMyFiles to find and delete duplicate files

SearchMyFiles is another useful program developed by NirSoft. This tool helps you easily find files by wildcard, by last modified/created/last accessed time, by file attributes, by file content, or by file size. It also offers you the Duplicate Search mode to identify and remove duplicate files from the computer.

  1. Launch SearchMyFiles
  2. In the Search Options, select the search mode to Duplicate Search
  3. Mention the base folders where you need to search for duplicate files.
  4. Choose to scan subfolders if required, and click Start Search
    find and delete duplicate files - searchmyfiles
    SearchMyFiles finds duplicate files in the specified folders paths and highlights identical files in the same color.find and delete duplicate files - searchmyfiles
  5. For rich colors, click the Options menu, Duplicate Mark Color Set, and click Color Set 2
    find and delete duplicate files - searchmyfiles

    You can see that the duplicate files with different file names (than the original) are in the list. It’s possible that SearchMyFiles computes file hash to identify duplicates, but the file hash is not shown as a column option.

  6. Sort the results by Duplicate Number column, which is similar to serial number or index. Every duplicate/identical file in a group shares the same duplicate number index.There is also a Duplicate Group column which shows the total number of duplicates for each file. For instance, duplicate group 2, 3, 4 represents the 2nd, 3rd, and 4th identical file — i.e., totally 4 identical files.

    find and delete duplicate files - searchmyfiles

  7. To show only the duplicate files – i.e., hide the Duplicate Group 1, click on the Options menu → Duplicate Search Options → select Show Only Duplicate Files
    find and delete duplicate files - searchmyfiles
     

    This hides the 1st item in every duplicate group.find and delete duplicate files - searchmyfiles

    Example

    ::BEFORE::
    
    =======================================================================
    Name                    Folder      Duplicate Group
    -----------------------------------------------------------------------
    w10-enhanced-search-settings.png    D:\Screenshots  1
    images (10) - Copy.png          D:\Images\May   2
    images (10).png             D:\Images\May   3
    images (11) - Copy.png          D:\Images\May   4
    =======================================================================
    
    ::AFTER::
    
    =======================================================================
    Name                    Folder      Duplicate Group
    ----------------------------------------------------------------------- 
    images (10) - Copy.png          D:\Images\May   2
    images (10).png             D:\Images\May   3
    images (11) - Copy.png          D:\Images\May   4
    =======================================================================
    
  8. You can now easily select all files, or order the list by Duplicate Group column and select files of a particular duplicate group set (e.g., 3rd duplicate) and delete them. Select the items and press Del to send the duplicates to the Recycle Bin. Pressing Shift + Del deletes the duplicate items permanently.

4. Using Auslogics Duplicate File Finder to remove duplicate files

Auslogics Duplicate File Finder sorts through images, music, videos, and other personal files to remove duplicate copies and free up disk space. It can compare not only the file names but also the contents to ensure the duplicate search results are accurate.

  1. In Auslogics Duplicate File Finder main window, you can configure it to look for all file types or specific file types (e.g., images, videos, etc.)
    find and delete duplicate files - auslogics
  2. Click Next in the search wizard
  3. Uncheck Ignore files smaller than
  4. Uncheck Ignore files larger than
  5. Click Next
  6. Select Ignore File Names
  7. Select Ignore File Dates
  8. Disable Ignore Hidden Files
  9. Click Search
    find and delete duplicate files - auslogics
  10. Once the duplicate files appear in the results, click the Select button. By default the select button selects all duplicate files in a group – i.e., it leaves one (main) file in each group.You can also choose one of the following Select button dropdown options as needed:
    • Select Duplicates by Modification Date (by Earliest or Latest)
    • Select One in Each Group
    • Select All Duplicates in Each Group (default)
  11. Click Delete Selected Files → To Recycle Bin

Auslogics Duplicate File Finder has a neat user interface and the program is completely free. But the program advertises the vendor’s other products via Taskbar notification and in the program’s menu options which some users may find inconvenient.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

2 thoughts on “How to Find and Delete Duplicate Files in Windows”

Leave a Comment