Compare two folder’s file lists (in Windows)

Note

Added for reference. Taken from Easily Compare Two Folders by Using PowerShell.

The following commands (in PowerShell), can be used to compare two (2) directories file lists (to see what is missing for each other).

Steps

Open PowerShell and invoke the following:

$a = Get-ChildItem -Recurse -path <folder1>
$b = Get-ChildItem -Recurse -path <folder2>
Compare-Object -ReferenceObject $a -DifferenceObject $b