You have two folders that should be identical — a backup and the original, two branches of a project, a local copy and a network share — but you are not sure they actually are. How do you tell which files are different in Windows folders without opening hundreds of files manually? This guide walks through every method from a 30-second Explorer check to automated PowerShell scripts, ranked by effort and use case, so you can pick the right approach for your situation.
Why Comparing Folders Matters
Directory compare tasks come up constantly in real workflows. A developer needs to confirm that a deployment package matches the approved source. An IT administrator wants to verify that a network backup completed correctly and no files were silently skipped. A content manager is merging two project folders and needs to know which version of each document is newer. A student wants to check that their flash drive copy matches the files on their laptop before handing in coursework.
In each case, the question is the same: between two folders, which files are present in one but not the other, and which files exist in both but have different content? Windows provides several ways to answer that question — ranging from a rough visual check in File Explorer to precise, scriptable windows directory comparison utilities — and each approach involves different trade-offs between speed, accuracy, and technical complexity.
There are two distinct kinds of difference to look for:
- Structural differences — files or subfolders that exist in one location but not the other.
- Content differences — files that exist in both locations with the same name but different content (or modification date).
Most folder compare tools detect both. The methods below are organized from quickest (but least detailed) to most thorough (and most scriptable). If you are also comparing individual file contents — not just which files differ — jump ahead to the After Finding Different Files section at the end.
Quick Method: Windows File Explorer Properties
The fastest folder comparison on Windows 10 or Windows 11 requires no additional software at all. File Explorer can give you a rough sanity check in under a minute using folder properties.
Steps
- Open File Explorer and navigate to the parent folder containing the two directories you want to compare.
- Right-click on the first folder and select Properties.
- Note the Size and Contains (number of files and subfolders) values. Leave this dialog open or write them down.
- Right-click on the second folder and open its Properties.
- Compare the two sets of numbers side by side.
For a slightly more granular check, sort both folders by Date modified and look for files that show different timestamps. This works well when you know you recently edited only a handful of files and just need to confirm which ones changed.
Limitations: Explorer does not show which specific files differ, cannot detect content changes in files of the same size, and does not recurse into subfolders in a useful way for comparison. For anything beyond a rough check, use one of the methods below.
Command Line: Robocopy /L for Folder Comparison
Robocopy
(Robust File Copy) is built into every version of Windows since
Vista and is one of the most powerful built-in windows diff tool options — a genuine
software to compare files in folders without installing anything extra.
The key to using it for directory compare without changing anything is the
/L flag, which puts Robocopy into "list only" mode — it reports what it
would do without actually doing it.
Basic Folder Diff Command
robocopy "C:\FolderA" "C:\FolderB" /L /E /NJH /NJS Flag breakdown:
/L— list only; no files are copied or deleted/E— include all subdirectories, even empty ones/NJH— no job header (cleaner output)/NJS— no job summary
Any file listed in the output is one that Robocopy would copy — meaning it is
either missing from FolderB or has a newer modification date in
FolderA. Files that are identical in both locations are not listed.
Saving the Report to a File
robocopy "C:\FolderA" "C:\FolderB" /L /E /NJH /NJS > diff-report.txt Redirect the output to a text file for a permanent record. This is useful for auditing a backup or generating a change manifest before a deployment.
Detecting Files Present Only in FolderB
Robocopy's /L mode only shows files that would flow from source to
destination. To find files that exist only in FolderB (files that were added
to the destination but not the source), run the comparison in reverse:
robocopy "C:\FolderB" "C:\FolderA" /L /E /NJH /NJS Comparing both directions gives you a complete picture of the structural differences. This is the standard approach for a windows compare two directories workflow without installing any third-party software.
This is the simplest way to windows compare two folders from the command
line with zero setup. The same approach applies on Linux and macOS using the built-in
diff -rq command. If you work cross-platform, see our guide to the
diff command in Linux/Unix for the
equivalent syntax.
PowerShell: Compare-Object for Directory Diff
PowerShell's Compare-Object cmdlet is the most flexible built-in
windows compare folders solution. Unlike Robocopy, it can compare
directories by file name, size, last-write time, or cryptographic hash — giving you
a genuinely content-aware directory compare without third-party software.
Compare by Name and Size (Fast)
$a = Get-ChildItem "C:\FolderA" -Recurse
$b = Get-ChildItem "C:\FolderB" -Recurse
Compare-Object $a $b -Property Name, Length The output uses two indicators:
<=— file exists only inFolderA(reference set)=>— file exists only inFolderB(difference set)
Files that appear in both folders with matching name and size are not shown. This is a fast windows directory comparison but it can miss content changes in files that happen to have the same size.
Compare by Cryptographic Hash (Accurate)
For a definitive content comparison — the kind used for backup verification and security auditing — use SHA256 hashes:
$hashA = Get-ChildItem "C:\FolderA" -Recurse -File |
Select-Object Name, @{Name="Hash";Expression={(Get-FileHash $_.FullName -Algorithm SHA256).Hash}}
$hashB = Get-ChildItem "C:\FolderB" -Recurse -File |
Select-Object Name, @{Name="Hash";Expression={(Get-FileHash $_.FullName -Algorithm SHA256).Hash}}
Compare-Object $hashA $hashB -Property Name, Hash Any file with a different hash has different content, period — regardless of file size or modification date. This method catches cases that Robocopy and Explorer miss. It is slower on large folders (hashing takes time) but is the gold standard for compare files in two folders accuracy.
Export Results to CSV
Compare-Object $a $b -Property Name, Length |
Export-Csv "C:\folder-diff.csv" -NoTypeInformation Exporting to CSV makes it easy to review results in Excel or share them with colleagues. This is a common pattern in IT audits and deployment verification workflows. For more on comparing spreadsheet data, see our guide on how to compare 2 Excel files for differences.
WinMerge: Free GUI Folder Compare Tool
For anyone who prefers a visual interface, WinMerge is the most respected free folder compare tool on Windows and widely regarded as the best file compare utility in the open-source space. It is released under the GNU General Public License v2, actively developed since 2003, and available as a free download from winmerge.org. There is no paid tier, no usage limits, and no account required.
How to Use WinMerge for Folder Comparison
- Download and install WinMerge from winmerge.org.
- Open WinMerge and go to File > Open.
- Set the left path to FolderA and the right path to FolderB.
- Make sure Folder is selected (not File), then click OK.
- WinMerge displays a tree view showing both folders side by side with color-coded status for every file.
Color coding in WinMerge's compare folders view:
- Yellow — file exists in both folders but content differs
- Gray (left only) — file exists only in the left folder
- Gray (right only) — file exists only in the right folder
- White — file is identical in both folders
Double-clicking any yellow (different) file opens WinMerge's side-by-side file diff viewer, showing exactly which lines changed. This two-level workflow — folder structure first, then individual file content — is why WinMerge is the preferred file and folder comparison software for most Windows users who want a free, no-install-overhead option.
WinMerge Comparison Options
Under Edit > Options > Compare, WinMerge offers several comparison methods:
- Date and Size — fast, uses modification time and file size (default)
- Date — uses only modification time
- Size — uses only file size
- Contents — reads the actual file data, byte by byte (slowest but most accurate)
- Binary contents — byte-level comparison for binary files
For a definitive file directory comparison tool workflow, set the comparison method to Contents. For large folders where speed matters more than absolute accuracy, the default Date and Size method is usually sufficient. Either way, WinMerge is a reliable windows compare folders option whether you need byte-level accuracy or just a quick structural overview.
Beyond Compare and Other Premium Tools
If you need more power than WinMerge provides — particularly for large-scale enterprise workflows, three-way merges, or FTP/cloud-connected comparisons — commercial file and folder comparison tool options are worth evaluating. Each tool below goes beyond a basic dir compare windows check and adds features that justify the price for professional teams.
Beyond Compare
Beyond Compare (by Scooter Software) is the gold standard commercial directory compare software. It supports local folders, FTP sites, Dropbox, S3, and other cloud storage locations in the same comparison view. Key features include:
- Three-way folder merge for resolving conflicts
- Scripting API for automated comparison jobs
- Cloud folder comparison (Dropbox, Google Drive, OneDrive)
- Archive comparison (ZIP, TAR, etc.) without extracting
- FTP/SFTP site comparison
Beyond Compare is priced at $35 for a Standard license and $70 for Pro (which includes three-way merge). A 30-day free trial is available.
Meld
Meld is a free, open-source folder compare tool originally built for Linux but available on Windows. It offers a clean three-panel view for three-way comparisons, tight Git and Subversion integration, and a simple interface that is easy to learn. Meld is released under the GPL and is free to download from meldmerge.org.
Total Commander
Total Commander is a veteran dual-pane file manager for Windows with a built-in dir compare windows feature. Its Synchronize Dirs function compares two directories and lets you selectively copy or delete files in either direction. The file compare view integrates directly into the file manager workflow, making it efficient for users who already use Total Commander as their primary file manager. Total Commander uses a shareware model with a one-time license fee.
VS Code
Visual Studio Code is not primarily a folder compare tool, but it can compare individual files effectively through its built-in diff viewer. For file-level comparison within a project, VS Code is often already open. For a complete walkthrough of VS Code's comparison features, see our guide to comparing two files in VS Code.
Comparison Table: Which Method Fits Your Workflow
Not every windows diff tool is right for every situation. Here is an honest file directory comparison tool breakdown — covering the methods above plus a few others — so you can match the approach to your skill level, folder size, and accuracy requirements.
| Method | Best for | Setup | Accuracy | Recurse | Free? |
|---|---|---|---|---|---|
| File Explorer Properties | 30-second sanity check | None (built-in) | Low (size only) | No | Yes |
| Robocopy /L | Quick CLI diff, no install | None (built-in) | Medium (date + size) | Yes (/E) | Yes |
| PowerShell Compare-Object | Scriptable, hash-accurate | None (built-in) | High (hash mode) | Yes | Yes |
| WinMerge | Visual GUI, free, open-source | Install (~10 MB) | High (contents mode) | Yes | Yes (GPL) |
| Meld | Three-way merge, Git integration | Install (~60 MB) | High | Yes | Yes (GPL) |
| VS Code | File-level diff inside a project | Already installed (for devs) | High | No (file by file) | Yes |
| Beyond Compare | Enterprise, cloud, FTP, 3-way | Install + license ($30–$60) | High | Yes | Trial only |
| Total Commander | File manager + folder sync | Install + license (~€44) | High | Yes | Shareware |
Decision shortcut: If you want zero install and are comfortable in a terminal, use Robocopy or PowerShell. If you want a visual interface and the best free file compare tool windows has to offer, install WinMerge. If you need to windows compare two folders across cloud storage or run three-way merges, invest in Beyond Compare.
Advanced: Automating Recurring Folder Comparisons
If you need to compare two directories on a recurring schedule — for example, a nightly backup verification, a weekly audit between a local folder and a network share, or a CI/CD pipeline check — you can automate the entire process without any third-party directory compare tool.
Automated PowerShell Comparison Script
Save the following script as folder-diff.ps1 and run it manually or via
Task Scheduler:
param(
[string]$FolderA = "C:\Source",
[string]$FolderB = "C:\Backup",
[string]$ReportPath = "C:\Logs\folder-diff-$(Get-Date -Format 'yyyyMMdd').csv"
)
$filesA = Get-ChildItem $FolderA -Recurse -File |
Select-Object Name, Length, LastWriteTime,
@{Name="RelPath";Expression={$_.FullName.Substring($FolderA.Length)}},
@{Name="Hash";Expression={(Get-FileHash $_.FullName -Algorithm SHA256).Hash}}
$filesB = Get-ChildItem $FolderB -Recurse -File |
Select-Object Name, Length, LastWriteTime,
@{Name="RelPath";Expression={$_.FullName.Substring($FolderB.Length)}},
@{Name="Hash";Expression={(Get-FileHash $_.FullName -Algorithm SHA256).Hash}}
$result = Compare-Object $filesA $filesB -Property RelPath, Hash
$result | Export-Csv $ReportPath -NoTypeInformation
Write-Host "Differences found: $($result.Count)"
Write-Host "Report saved to: $ReportPath" Schedule with Windows Task Scheduler
- Open Task Scheduler (search for it in the Start menu).
- Click Create Basic Task.
- Set the trigger to your desired schedule (Daily, Weekly, etc.).
- Set the action to Start a Program.
- Program:
powershell.exe - Arguments:
-ExecutionPolicy Bypass -File "C:\Scripts\folder-diff.ps1" -FolderA "C:\Source" -FolderB "C:\Backup"
The script produces a dated CSV report in C:\Logs\ on every run. You can
extend it to send an email alert if differences are found, or integrate it with a
monitoring system. This is the most powerful file folder compare tool
approach for recurring workflows — no recurring license cost, no third-party
software to compare files in folders required — and the output is a
standard format that pipes into any reporting tool.
Cloud Folder Scenarios
OneDrive, Google Drive, and Dropbox all sync to local folders on Windows. Once the cloud folder is locally available (in its sync location), all of the methods above work on it exactly as they would on any local directory. For example, to compare two folders where one is a OneDrive sync location:
robocopy "C:\Users\you\OneDrive\ProjectDocs" "C:\LocalBackup\ProjectDocs" /L /E /NJH /NJS For cloud-to-cloud comparisons (e.g., comparing two SharePoint libraries, or an S3 bucket against a local folder), Beyond Compare's cloud connectors or a dedicated sync tool are more practical than a pure PowerShell approach.
After Finding Different Files: See Exactly What Changed
Every method above answers which files differ between two folders. But once you have that list, you often need to answer the deeper question: what exactly changed inside those files? A file that shows as "different" might have had one word corrected, a configuration value flipped, a function renamed, or hundreds of lines rewritten. The folder comparison only tells you that something changed.
That is where a dedicated file content comparison tool becomes essential. For text files, source code, JSON, YAML, and documents, a diff viewer shows you the exact additions and deletions at the line — or even character — level.
For example, if Robocopy flags a JSON configuration file as different between your
staging and production folders, opening both versions in a diff tool will immediately
show you which key changed from false to true — a change that
is invisible to any folder-level comparison but could be causing a production issue.
Similarly, if you are trying to find the
difference between two versions of a document, a line-level diff is far more useful
than knowing the files have different sizes.
WinMerge includes a built-in file diff viewer — double-click any flagged file in the folder view and it opens side by side. For individual file comparison outside of WinMerge, the Diff Checker Chrome extension is a fast, no-install option that works directly in your browser:
- Drag and drop files directly into the comparison pane
- Supports .txt, .js, .ts, .json, .html, .css, .py, .sql, .yaml, .md, and 15+ other formats
- Handles DOCX and XLSX files via built-in parsing (Mammoth for Word, SheetJS for Excel)
- Split view and unified view toggle
- Syntax highlighting for 20+ languages via Monaco Editor
- Runs entirely in your browser — no files are uploaded to any server
If you regularly compare Word documents between folders, see our guide on how to compare two Word documents. For Excel files that show up as different between two directories, the Excel comparison guide walks through the best options including Spreadsheet Compare and browser tools. Need to compare simple lists of filenames or values? Our compare two lists guide covers that. For raw text or configuration strings, try the string compare walkthrough.
See Exactly What Changed Inside Your Files — Free
Found different files between your folders? Open them in Diff Checker to see exactly what changed — split-view comparison with syntax highlighting for 20+ languages. No upload, no account, no install required.
- Drag & drop file upload (up to 2 files)
- 20+ languages with Monaco syntax highlighting
- Split view and unified diff mode
- DOCX and XLSX support built-in
- JSON key sorting + Prettier formatting
- AI-powered diff summary via OpenAI
- 100% client-side — files never leave your browser
- Dark mode, history, and auto-save
Rated 5.0 stars · Used by 1,000+ users
Frequently Asked Questions
How do I compare files in two folders in Windows?
You have four main options: (1) File Explorer — compare folder
properties for a quick size/count check, (2) Robocopy /L — run
robocopy FolderA FolderB /L /E /NJH /NJS in Command Prompt for a list
of differences without copying anything, (3) PowerShell Compare-Object
— use Compare-Object (Get-ChildItem FolderA -Recurse) (Get-ChildItem FolderB -Recurse)
for a scriptable comparison, (4) WinMerge — a free open-source GUI
tool that shows folder differences visually side by side.
What is the best free folder compare tool for Windows?
WinMerge is the most widely recommended free folder compare tool
for Windows. It is open-source, released under the GNU General Public License, and
supports recursive directory comparison with a visual tree view, file-level diff
highlighting, and merge capabilities. Download it free from winmerge.org. For a
fully built-in option with no install, PowerShell's Compare-Object
with SHA256 hashing is the most accurate zero-cost alternative.
How do I use Robocopy to compare two folders without copying?
Use the /L flag (log only):
robocopy "C:\FolderA" "C:\FolderB" /L /E /NJH /NJS. The /L
flag makes Robocopy list what it would do without actually doing it. Files that
appear in the output are ones that differ between the folders. To find files that
exist only in FolderB, run the command in reverse with FolderB as the source.
Can PowerShell compare two folders?
Yes. PowerShell's Compare-Object cmdlet handles
windows compare two directories natively. Use
Get-ChildItem to list files in each folder, then pipe into
Compare-Object. For content accuracy, replace the Length
property with a SHA256 hash from Get-FileHash — files with different
hashes have different content regardless of size or timestamp.
Is WinMerge free?
Yes, WinMerge is completely free. It is an open-source project released under the GNU General Public License v2. All features — including folder comparison, file diff, merge tools, and plugin support — are included at no cost. The project has been actively maintained since 2003 and is available at winmerge.org.
How do I sync two folders after comparing them in Windows?
After identifying differences, remove the /L flag from your Robocopy
command to copy new and updated files. Add /MIR to mirror the source
directory exactly (including deleting files in the destination that are not in the
source — use with caution). WinMerge also has a built-in copy/merge operation
accessible by right-clicking any different file. For two-way sync, FreeFileSync
(free, open-source) is a dedicated tool designed specifically for that workflow.