只取最后一个- @if(0)==(0) echo off&setlocal enabledelayedexpansion
- @for /f "delims=" %%i in ('dir /b/a-d/on "*.txt"') do (
- @for /f "delims=" %%j in ('type %%i^|cscript -nologo -e:jscript "%~f0"') do (
- set str=%%j
- )
- echo !str!>>%%~ni.log
- )
- pause & exit /b
- @end
- WSH.echo(WScript.StdIn.ReadAll().match(/BDUSS=[^\r\n]+/g).join('\r\n'))
复制代码 echo !str!>>%%~ni.log向上移动一行,取多行,%%~ni.log可以改为你想输出保存的文件名 |