[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
本帖最后由 idwma 于 2021-11-24 22:14 编辑
  1. #@&cls&powershell "type %~s0|out-string|iex"&pause&exit
  2. dir D:\A|%{
  3. $c=[IO.File]::OpenRead($_.fullname)
  4. $d+=@([BitConverter]::ToString([Security.Cryptography.MD5]::Create().ComputeHash($c)).Replace("-","")+"    "+"$_.name")
  5. $c.Close()
  6. }
  7. out-file -input $d -enc default a.md5.txt
复制代码
  1. #@&cls&powershell "type %~s0|out-string|iex"&pause&exit
  2. $a=type a.md5.txt
  3. dir D:\B|%{
  4. $c=[IO.File]::OpenRead($_.fullname)
  5. $b=[BitConverter]::ToString([Security.Cryptography.MD5]::Create().ComputeHash($c)).Replace("-","")
  6. $c.Close()
  7. if($a -match $b){del $_.fullname}else{out-file -input "$b    $_.name" -enc default a.md5.txt -append}
  8. }
复制代码

TOP

回复 4# 娜美
  1. dir D:\A\* -include *.rar,*.txt,*.zip,*.7z,*.csv
复制代码

TOP

返回列表