回复 12# 大地
- @echo off
- for /f "delims=" %%a in ('""C:\Program Files\7-Zip\7Z.exe" e "%SystemRoot%\System32\Taskmgr.exe" -ir!.rsrc\version.txt -y -so | sort /r"') do (
- set "line=%%a"
- goto ProcessLine
- )
- :processLine
- setlocal enabledelayedexpansion
- set "substr=!line:~20,5!"
- echo 截取结果:!substr!
- pause
- endlocal
复制代码
参考 http://www.bathome.net/thread-66195-1-2.html |