双字节字符后8位会串到下一个键
加个判断就好了 | @echo off | | set/p=拖入文件:<nul | | for /f "delims=" %%I in ( | | 'powershell "[text.encoding]::default.getstring([byte[]]($(do {[int][console]::ReadKey(1).KeyChar} while ([console]::KeyAvailable))|foreach{if([int]$_ -gt 255){[bitconverter]::GetBytes([int]$_)[0]}else{$_}}))"' | | ) do set "wj=%%~I"&echo= | | echo=%wj% | | pauseCOPY |
|