Skip to content

Instantly share code, notes, and snippets.

@ScriptingPro
Created October 25, 2017 23:57
Show Gist options
  • Save ScriptingPro/ea5bb279ba5387c7969b4e7d75a9d805 to your computer and use it in GitHub Desktop.
Save ScriptingPro/ea5bb279ba5387c7969b4e7d75a9d805 to your computer and use it in GitHub Desktop.
powershell find duplicate files
# powershell find duplicate files md5
# powershell get childitem filter duplicates
# script to find duplicate files windows
# powershell duplicate files md5
gci * -Recurse | get-filehash -Algorithm MD5 | Group-Object hash | ?{$_.count -gt 1} | select @{n='DupeCount';e={$_.Count}}, @{n='DupeFiles';e={$_.Group.Path -join [System.Environment]::NewLine}} | Out-GridView
@iminet
Copy link

iminet commented Apr 6, 2021

Hi, that's a good script, I've looked for a long time, thank you.
May I suggest you a feature? After finding duplicates, it would be great if user can choose to remove duplicates (keeping only the first instance).
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment