How to Compare Two Folders in Windows 10

To compare two folders in Windows 10, open Command Prompt and run robocopy "Folder A" "Folder B" /L /E /NJH /NJS /NP /NDL /NS. The /L switch only lists files and doesn’t copy anything. It shows which files are only in Folder A, which changed, and which are only in Folder B.

Applies to: Windows 10. Windows 10 reached end of support on October 14, 2025, and only PCs enrolled in Extended Security Updates still get security fixes, through October 12, 2027.

Compare two folders with robocopy

  1. Select Start, type cmd, and open Command Prompt.
  2. Type this command, using your own folder paths, and press Enter:

robocopy "C:\Users\Alex\Pictures\Trip" "E:\Trip" /L /E /NJH /NJS /NP /NDL /NS

  1. Read the list:
  • New File is only in the first folder.
  • Newer or Older is in both folders, but the copies are different.
  • *EXTRA File is only in the second folder.
Windows 10 Command Prompt running robocopy with the /L switch and listing new, newer and extra files
Run robocopy with /L (1) to see the differences (2).

Files that are the same in both folders aren’t listed. If nothing is listed, the folders match.

Important: keep /L in the command. Without it, robocopy copies files.

What the switches mean

  • /L lists files only. Nothing is copied, deleted or changed.
  • /E includes all subfolders.
  • /NJH and /NJS hide the header and summary.
  • /NP, /NDL and /NS hide progress, folder names and file sizes to keep the list short.

Save the results to a file

For a long list, add /LOG: and a file name to the end of the robocopy command, for example /LOG:"%USERPROFILE%\Desktop\compare.txt". Nothing appears in the window; open the text file on your desktop instead.

Compare two files with fc

To check whether two copies of one file are exactly the same, run:

fc /b "C:\Users\Alex\Pictures\Trip\IMG_2101.jpg" "E:\Trip\IMG_2101.jpg"

Windows 10 Command Prompt running fc /b on two photos with the message FC: no differences encountered
Run fc /b on two files (1). No differences means they match (2).

If the files are different, fc lists the places where they differ.

Compare with PowerShell

To list file names that are in only one folder, open PowerShell and type, with your own paths:

Compare-Object (Get-ChildItem "C:\Folder A" -Recurse -File | Select-Object -ExpandProperty Name) (Get-ChildItem "E:\Folder B" -Recurse -File | Select-Object -ExpandProperty Name)

A <= arrow means the file is only in the first folder, and => means it’s only in the second. To check whether two files are identical, compare their hashes with Get-FileHash.

A quick check in File Explorer

For a rough check, right-click each folder and select Properties. Compare the Size and Contains lines. If they match, the folders probably hold the same files, but robocopy is the way to be sure.

If the comparison looks wrong

  • Every file shows as different: drives formatted as FAT32 or exFAT store times less precisely. Add /FFT to the robocopy command.
  • The command fails with a path ending in a backslash: a path like “E:\” confuses robocopy. Type E:\ without quotes, or use “E:\.” instead.
  • Some folders are skipped with Access denied: run Command Prompt as an administrator.

Frequently asked questions

How do I copy a folder path into Command Prompt?

Hold Shift, right-click the folder, and select Copy as path, then paste it into the command. The same trick works when you copy the path of a file.

How do I find duplicate files?

Robocopy only compares two folders. To hunt for copies across a whole drive, find duplicate files in Windows 10 with a different method.

How do I copy the missing files across?

Copy them in File Explorer. Moving a lot of files to another computer? These ways to transfer files from PC to PC can help.

Does robocopy check what’s inside each file?

No. It compares size and date. Two files can differ inside while matching on both. To be sure, compare them with fc /b or their hashes.

Can I compare folders on two different PCs?

Yes. Share the folder on one PC and use its network path, such as \\OTHER-PC\Photos, as one of the folders in the command.

Is there a side-by-side view?

Windows 10 doesn’t include one. Free apps such as WinMerge show two folders side by side and highlight the differences, if you’re allowed to install apps.

Does this work on Windows 11?

Yes. Robocopy, fc and PowerShell work the same way on Windows 11.

Can I make the second folder an exact copy of the first?

Yes, with robocopy "Folder A" "Folder B" /MIR. Be careful: /MIR also deletes files in Folder B that aren’t in Folder A. Run it with /L first to see what would change. Keep a backup of anything important before you mirror folders.

Every switch is listed on the command pages for robocopy and fc.