Skip to content

Instantly share code, notes, and snippets.

@MrP
Created February 14, 2016 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrP/b6060d10d5bee26b6f8c to your computer and use it in GitHub Desktop.
Save MrP/b6060d10d5bee26b6f8c to your computer and use it in GitHub Desktop.
PowerShell find duplicates
ls Dropbox, Documents\Mega -recurse |
group -property length |
where { $_.count -gt 1 } |
% {
$_.group |
select |
get-filehash |
group -property hash |
where { $_.count -gt 1 } |
% { $_.group | select }
} |
echo | Out-File dupesDM.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment