回复 13# Blitz
大佬的方法不错,综合处理了下:- @echo off & setlocal enabledelayedexpansion
- :run
- set/p=拖入文件:<nul
- for /f "delims=" %%I in (
- 'powershell "do {[void][console]::ReadKey().KeyChar} while ([console]::KeyAvailable)"'
- ) do set "wj=%%~I"&echo=
- for /f "tokens=1,2 delims=:^ " %%a in ('certutil -hashfile "%wj%" SHA256') do (
- set date1=%%a
- set date2=%%b
- if not defined date2 (echo %wj% !date1!)
- )
- goto run
复制代码
|