且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用 Powershell 删除重复文件

更新时间:2023-12-04 21:32:22

试试这个:

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

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