批处理提示 命令语法不正确
刚重装了XP系统,在运行如下命令的批处理文件时,提示。命令语法不正确.请高人寻找原因。寻求解决方法。不甚感谢。!@echooffifexisthead.txtrenhea...
刚重装了XP系统,在运行如下命令的批处理文件时,提示。命令语法不正确.请高人寻找原因。寻求解决方法。不甚感谢。!@echo off if exist head.txt ren head.txt head.1 if exist tail.txt ren tail.txt tail.1
if exist head.1 goto existhead echo 不存在head.txt文件 goto end :existhead if exist tail.1 goto existtail echo 不存在tail.txt文件 goto end :existtail if exist ok goto op md ok
:op for %%b in (*.txt) do copy head.1+%%b+tail.1 ok\%%b
:end if exist head.1 ren head.1 head.txt if exist tail.1 ren tail.1 tail.txt pause 展开
if exist head.1 goto existhead echo 不存在head.txt文件 goto end :existhead if exist tail.1 goto existtail echo 不存在tail.txt文件 goto end :existtail if exist ok goto op md ok
:op for %%b in (*.txt) do copy head.1+%%b+tail.1 ok\%%b
:end if exist head.1 ren head.1 head.txt if exist tail.1 ren tail.1 tail.txt pause 展开
2013-06-07
展开全部
帮你重新排版下,累人@echo off
if exist head.txt ren head.txt head.1
if exist tail.txt ren tail.txt tail.1
if exist head.1 goto existhead
echo 不存在head.txt文件
goto end
:existhead
if exist tail.1 goto existtail
echo 不存在tail.txt文件
goto end
:existtail
if exist ok goto op
md ok
:op
for %%b in (*.txt) do copy /b head.1+%%b+tail.1 ok\%%b
:end
if exist head.1 ren head.1 head.txt
if exist tail.1 ren tail.1 tail.txt
pause
if exist head.txt ren head.txt head.1
if exist tail.txt ren tail.txt tail.1
if exist head.1 goto existhead
echo 不存在head.txt文件
goto end
:existhead
if exist tail.1 goto existtail
echo 不存在tail.txt文件
goto end
:existtail
if exist ok goto op
md ok
:op
for %%b in (*.txt) do copy /b head.1+%%b+tail.1 ok\%%b
:end
if exist head.1 ren head.1 head.txt
if exist tail.1 ren tail.1 tail.txt
pause
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询