本帖最后由 pcl_test 于 2016-11-8 14:42 编辑
- @echo off&setlocal enabledelayedexpansion
- rem 删除文本最后一行
- for /f "tokens=1* delims=:" %%a in ('findstr /n .* "文本.txt"') do (
- if defined line echo;!line!
- set "line=%%b"
- )
- pause
复制代码
- //&cls&cscript -nologo -e:jscript "%~f0"<"文本.txt"&pause&exit
- WSH.Echo(WSH.StdIn.ReadAll().replace(/[^\r\n]{8}[\r\n]*$/,''));
复制代码
|