- @echo off & setlocal EnableDelayedExpansion
- type nul>"%~dp0MD5.log"
- for /f "delims=" %%a in ('dir /a-d /b /s *.*') do (
- if "%%~nxa" neq "%~nx0" (
- for /f "delims=" %%b in ('certutil -hashfile "%%a" MD5^|findstr /r /be /c:"[0-9a-f][0-9a-f ]*"') do (
- set "MD5=%%b"&set MD5=!MD5:^ =!&echo !MD5! = %%a>>"%~dp0MD5.log"
- )
- )
- )
- pause
复制代码
|