ECHO 处于关闭状态......求助!!!!
bat吧
全部回复
仅看楼主
level 1
6921008 楼主
@echo off&setlocal enabledelayedexpansion
set cs=0
set /p File=把你的TXT文件拖进bat窗口然后按Enter(回车键)确认 ::
cls
set /p firstr=<%File%
for /f "tokens=2 delims=^:" %%a in ("%firstr%") do set a=%%a
echo %a%
echo %a% >新的TXT名字.txt
set oldstr=%a%
:loop
set /a cs+=1
for /f "skip=%cs% tokens=2 delims=^:" %%i in ('type,%File%') do set newstr=%%i&goto GetEnd
:GetEnd
if !newstr!==!oldstr! goto End
echo.%newstr%
echo.%newstr%>>新的TXT名字.txt
set oldstr=%newstr%
goto loop
:End
start 新的TXT名字.txt
echo.运行完毕!按任意键退出..&pause>nul&exit
2017年11月30日 11点11分 1
level 3
echo.?
2017年12月01日 00点12分 2
是 ..这个是 输出:符号 以后的所有文字,但是 输出出来 就是ECHO 处于关闭状态
2017年12月01日 03点12分
@6921008 那么你还不懂?变量值为空。
2017年12月01日 04点12分
@ShenMiam ..需要怎么改
2017年12月01日 17点12分
@6921008 不清楚,反正第一个for语句没有读取到数据,所以变量a的值为空。你知道第二个set语句只能读取文件第一行是数据吗?
2017年12月03日 10点12分
1