求助:如何获取txt文件倒数第二行的内容,并且不要退出程序
非常感谢,RT!作者: slore 时间: 2009-12-7 11:38 @echo off&setlocal EnableDelayedExpansion
set currentline=该文本只有一行
set lastline=该文本为空
for /f "delims=" %%i in (test.txt) do (
set lastline=!currentline!
set currentline=%%i
)
echo %lastline%
pause