Created
October 21, 2023 09:16
-
-
Save tuantmb/21c4e04c51ea920b8d009988557d44d4 to your computer and use it in GitHub Desktop.
Powershell to list duplicate files in current directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem * -Recurse | Get-FileHash -Algorithm MD5 | Group-Object hash | Where-Object {$_.Count -gt 1} | Select-Object @{n='DupeCount';e={$_.Count}}, @{n='DupeFiles';e={$_.Group.Path -join [System.Environment]::NewLine}}, @{n='Hash';e={$_.Name}} | Out-GridView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://woshub.com/find-duplicate-files-powershell/