Removing duplicate files with Powershell

后端 未结 4 2063
渐次进展
渐次进展 2021-02-14 21:39

I have several thousand duplicate files (jar files as an example) that I\'d like to use powershell to

  1. Search through the file system recursively
  2. Find the
4条回答
  •  清歌不尽
    2021-02-14 22:16

    try this:

    ls *.txt -recurse | get-filehash | group -property hash | where { $_.count -gt 1 } | % { $_.group | select -skip 1 } | del
    

    from: http://n3wjack.net/2015/04/06/find-and-delete-duplicate-files-with-just-powershell/

提交回复
热议问题