
CODE: [Copy to clipboard]@echo off
color 0a
set n=0
type nul>md5.txt
set /p input= 请输入要进行判断的路径:
echo 正在获取信息......
for /f "delims=" %%i in ('dir /s /b /a-d "%input%"') do set ur=%%i&& call :md5
cls
echo 共处理 %n% 个文件
pause
exit
:md5
set/a n+=1
cls
title 正在处理文件第 %n%个文件 %ur%
echo.正在处理文件第 %n%个文件 %ur%
for /f "tokens=*" %%? in ('md5.exe -n "%ur%"') do (echo %n% %ur%=====%%?>>md5.txt)
goto :eof
CODE: [Copy to clipboard]for /f "usebackq tokens=*" %%? in (`md5.exe -n "%ur%"`) do (echo %n% %ur%=====%%?>>md5.txt)
E:\Cmd\cutest\quote>dir /b
a ( b .txt
a ) b .txt
( c d e f g ) .txt
E:\Cmd\cutest\quote>for %a in (*.txt) do @for /f "delims=" %b in ('md5 -n "%a"') do @echo:%b
906C0D2BD4054C3F03C3C243E7132879
D41D8CD98F00B204E9800998ECF8427E
9AEB7F1A6545B7F3FC45E2B54F614713
E:\Cmd\cutest\quote>
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |