Skip to content

How to find and delete duplicate files on Windows

Find duplicate files on Windows by hand with Explorer sorting, search operators, and PowerShell file hashes, plus what to verify before deleting anything.

WH William Hallin 5 min read
On this page

Duplicates accumulate through perfectly reasonable behavior. A phone backup imported twice, a folder copied to be safe before a reinstall, the same photo library synced by two apps, "Document - Copy (2).docx". Years of this can quietly cost tens of gigabytes. Windows has no duplicate finder built in, but you can do the job by hand with File Explorer and PowerShell. This guide shows the honest manual version, including the part where it gets slow, and what to demand from any tool you use instead.

Prefer to skip most of the hunt? eclean has no duplicate finder, but Cleaner's large file finder surfaces the biggest candidates with size and modified date next to each result, and nothing is removed without your review. It's free, with no trial timer. Download eclean for Windows.

1. Quick wins in File Explorer

Start where duplicates concentrate, in Downloads, Pictures, Documents, and any folder named some variant of "backup".

Open the folder, switch to Details view, and click the Size column header to sort. Files with identical sizes and similar names, sitting next to each other, are your first candidates. Sorting by Name catches the other easy pattern, since Windows names collisions predictably, photo.jpg, photo (1).jpg, photo - Copy.jpg.

One rule before you delete anything. A matching name proves nothing, in either direction. Two files named IMG_2041.jpg from different cameras can be completely different photos, and the same photo can live under two unrelated names. Names find candidates. Only content confirms duplicates, which is what section 3 is for.

2. Search operators to narrow the hunt

File Explorer's search box accepts operators that make candidate-hunting faster across a whole drive:

  • name:"- Copy" finds Windows-generated copies anywhere under the current folder.
  • name:"(1)" catches the download-collision pattern.
  • size:>500MB limits the hunt to files worth the effort; deleting a thousand duplicate 40 KB files recovers almost nothing.
  • kind:picture or kind:video restricts by type, and operators combine: kind:video size:>1GB.

Run these from the highest folder you want to sweep. Outside your indexed folders the search is slow, and it still only produces candidates, not confirmations.

3. Confirm duplicates by hash with PowerShell

A file hash is a fingerprint computed from the file's content. Two files with the same hash are identical for any practical purpose, regardless of name, date, or location. PowerShell's Get-FileHash computes them, and a pipeline can sweep a whole folder tree.

Open PowerShell from the Start menu and run this, with your own path substituted:

Get-ChildItem -Path "D:\Photos" -Recurse -File |
    Group-Object -Property Length |
    Where-Object { $_.Count -gt 1 } |
    ForEach-Object { $_.Group } |
    Get-FileHash |
    Group-Object -Property Hash |
    Where-Object { $_.Count -gt 1 } |
    ForEach-Object { $_.Group.Path; "" }

What it does, step by step. List every file under the path, group by file size and keep only sizes that appear more than once (files of different sizes can't be duplicates, and this pre-filter skips most of the expensive work), hash the survivors, group by hash, and print each set of identical files with a blank line between sets.

For a large sweep, append | Out-File "$env:USERPROFILE\Desktop\duplicates.txt" to the last line and review the list in a text editor instead of the console.

Then comes the manual part the script can't do. For every set, you decide which copy is the real one, open its location, and delete the rest yourself.

4. Why manual dedup is slow and risky

The script above is correct, and running it on a real photo library teaches you why duplicate finders exist.

Slow: hashing reads every byte of every candidate file. A few hundred gigabytes of photos and video means an hour or more of disk work, and re-running after changes starts from zero.

A cloud-sync trap: if a folder uses OneDrive Files On-Demand, hashing a placeholder file forces its full download first. Pointing the script at a lightly-synced cloud folder can trigger many gigabytes of downloads. Sweep local folders, or make files available offline deliberately first.

Risky at the deletion step: the script tells you which files match, not which copy matters. It's easy to delete the copy inside a folder an app depends on, like a photo library a catalog references by path, and just as easy to fumble a selection and delete both copies of something. The Recycle Bin is your only undo, Shift + Delete skips even that, and duplicates found on external drives usually bypass the bin entirely.

So budget real attention for the deletion pass, not just the scan. This is the half of the job where the damage happens.

5. What a good duplicate finder should show you first

If the manual route is more than you want to repeat, the tool you replace it with should clear a specific bar. Before it deletes anything, it should show:

  • Every match, grouped, with full paths, so you can see where each copy lives, not just a count and a "clean" button.
  • Content-based matching, the same guarantee hashing gave you, not filename guessing.
  • Which copy will be kept in each group, with you able to change it.
  • Nothing removed automatically. A duplicate finder that deletes on its own judgment is the risk from section 4 with a nicer interface.
  • A route back, meaning deletions go to the Recycle Bin, not straight to gone.

eclean does not include a duplicate finder, so we have no candidate to pitch you. Whichever tool you choose, hold it to that bar before you let it delete anything.

Keep it this way without the ritual

Duplicates are usually one slice of a fuller problem. If the goal is reclaiming a drive, the C: drive triage guide covers the rest of the space, and Cleaner's large file finder pairs naturally with a dedup pass, since the biggest duplicates hide among the biggest files. Download eclean free. The core stays free for good.