Skip to content

Instantly share code, notes, and snippets.

@niaher
Created July 2, 2015 11:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niaher/f09803834dd133d7b215 to your computer and use it in GitHub Desktop.
Save niaher/f09803834dd133d7b215 to your computer and use it in GitHub Desktop.
List identical files in 2 folders
$one = Get-ChildItem "C:\x" -Recurse -Include @("*.html", "*.js")
$two = Get-ChildItem "C:\y" -Recurse -Include @("*.html", "*.js")
Compare-Object -ReferenceObject $one -DifferenceObject $two -Property Name,Length -ExcludeDifferent -IncludeEqual
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment