How to compare two folders in Windows

Did the backup get everything? Which photos are on the laptop but not on the USB drive? Here's how to compare two folders on Windows 10 and 11, find what's missing, newer or changed, and copy only the differences.

Updated 19 October 2026 · By the FilesPro team

On this page
  1. robocopy: a dry run that lists differences
  2. PowerShell: compare names or contents
  3. FilesPro: compare side by side and copy the differences
  4. Which method should you use?

File Explorer has no folder compare. Comparing the item count and size in Properties tells you that two folders differ, but not which files. The methods below do.

1. robocopy: a dry run that lists differences

robocopy is built into Windows. With /L it only lists what it would copy, so nothing changes. Open Command Prompt or PowerShell and run:

robocopy "C:\Photos" "E:\Backup\Photos" /E /L /X /NJH /NP /NDL /FP

Every file that differs is listed with a label:

The summary at the end counts files and bytes that would be copied.

/L is what makes this a dry run. Without it, robocopy really copies. robocopy compares sizes and dates, not file contents.

2. PowerShell: compare names or contents

Which files are only on one side

$a = 'C:\Photos'; $b = 'E:\Backup\Photos'
$left  = Get-ChildItem $a -Recurse -File | ForEach-Object { $_.FullName.Substring($a.Length) }
$right = Get-ChildItem $b -Recurse -File | ForEach-Object { $_.FullName.Substring($b.Length) }
Compare-Object $left $right

<= means the file is only in the first folder, => only in the second.

Which files have different contents

To catch files that have the same name but different contents, compare checksums. This reads every byte, so it takes a while on big folders.

$a = 'C:\Photos'; $b = 'E:\Backup\Photos'
function Hashes($root) {
    Get-ChildItem $root -Recurse -File | Get-FileHash -Algorithm SHA256 |
        Select-Object @{ n = 'Path'; e = { $_.Path.Substring($root.Length) } }, Hash
}
Compare-Object (Hashes $a) (Hashes $b) -Property Path, Hash

Any file listed is missing on one side or has different contents.

3. FilesPro: compare side by side and copy the differences

FilesPro is a dual-pane file manager for Windows. It compares the two folders you have open, marks every difference right in the file lists, and copies only what's missing or newer.

  1. Open one folder in the left pane and the other in the right pane (Tab switches panes, CtrlShiftE turns on two panes).
  2. Press CtrlShiftP and run Compare panes. Subfolders are compared too.
  3. Files are marked as only here, newer, older or different, and a summary shows the counts on each side.
  4. Choose Copy → or Copy ← to copy the differences in that direction. Only files that are missing or newer are copied, so an older file never replaces a newer one. Files that differ but have the same date are left for you to decide.

Run Compare panes by content (checksums) instead to also read files of the same size and compare them with BLAKE3 checksums. It's slower, but it catches files whose contents changed without the date changing.

The copy runs in FilesPro's operation queue like any other copy: you can pause and resume it, have it verified with a checksum, and undo it with CtrlZ. Afterwards the marks update so you can see that both sides match. Clear comparison removes the marks.

Tip: turn on Synchronized browsing (CtrlShiftB) to open the same subfolder on both sides as you explore.

Which method should you use?

robocopy /LPowerShellFilesPro
Comes with WindowsYesYesNo
Finds missing filesYesYesYes
Newer / older by dateYesWith more scriptYes
Compares contentsNoYes (SHA-256)Yes (BLAKE3)
Shows results next to the filesNoNoYes
Copies only the differencesYes (without /L)With more scriptYes, one click
Undo the copyNoNoYes

Frequently asked questions

Can File Explorer compare two folders?

No. File Explorer can show both folders' sizes and item counts in Properties, but it can't list which files differ. Use robocopy, PowerShell or a file manager with folder compare.

How do I find files that are in one folder but not the other?

Run robocopy "A" "B" /E /L /X and look for New File (only in A) and *EXTRA File (only in B), or use PowerShell's Compare-Object on the two file lists.

How do I check that a backup copied correctly?

Compare file contents, not just names and dates: use Get-FileHash in PowerShell, or FilesPro's Compare panes by content. FilesPro can also verify each copy with a BLAKE3 or SHA-256 checksum as it copies.

Keep folders in sync without the guessworkA fast, keyboard-first file manager for Windows 10 and 11. No account, no ads, no telemetry.
Get it from the Microsoft Store

Related