联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off dir f:\>nul 2>nul if errorlevel 1 echo The Windows XP has not on OR the Network has disconnected.&pause&goto eof if errerlevel 0 goto true :true if not exist F:\%1.wbf echo The Windows XP has not exist the file you want.&pause&goto eof copy F:\%1.wbf . echo One file(s) copied successfully. pause dd.exe %1.wbf :eof
附件 1: SCREEN01.jpg (2006-10-27 11:03, 14.88 K, 下载附件所需积分 1 点 ,下载次数: 3) 附件 2: SCREEN02.jpg (2006-10-27 11:12, 8.51 K, 下载附件所需积分 1 点 ,下载次数: 2)
@echo off dir f:\ if errorlevel 1 goto fail if errerlevel 0 goto true :true if not exist F:\%1.wbf goto yes copy F:\%1.wbf . echo One file(s) copied successfully. pause dd.exe %1.wbf :fail echo The Windows XP has not on OR the Network has disconnected. pause goto eof :yes echo The Windows XP has not exist the file you want. pause goto eof :eof
@echo off if %1#==# goto END @ctty nul command /f /c if not exist f:\nul echo not connected>state1.flg command /f /c if not exist f:\%1.wbf echo file not exist>state2.flg @ctty con find "file not exist" state2.flg>nul if errorlevel 1 GOTO COPY find "not connected" state1.flg>nul if errorlevel 1 GOTO NOFILE type state1.flg GOTO DEL :NOFILE type state2.flg GOTO DEL :COPY copy f:\%1.wbf :DEL del state1.flg del state2.flg :END if exist %1.wbf dd %1.wbf
Originally posted by 9527 at 2006-10-27 22:24: 你八楼的代码改成以下试试,dos6.22 是不支持IF ELSE语句的,还有就是注意你的GOTO语句的转向问题,P处理是按顺序执行的 @echo off if exist F:\%1.WBF goto _c ...
Originally posted by lxmxn at 2006-10-27 20:43: 兄弟,再试试这个,如果还不行,请继续跟帖讨论。=_=!! [code] @echo off dir f:\ if errorlevel 1 goto fail if errerlevel 0 goto true :true if n ...
Originally posted by NaturalJ0 at 2006-10-27 23:32: [code] @echo off if %1#==# goto END @ctty nul command /f /c if not exist f:\nul echo not connected>state1.flg command /f /c if not exist f:\%1.wbf echo file not exist>state2.flg @ctty c ...
附件 1: SCREEN03.jpg (2006-10-28 04:17, 15.45 K, 下载附件所需积分 1 点 ,下载次数: 2)
Originally posted by rgb82754670 at 2006-10-28 03:57: 20楼的仁兄,dir f:\ 我有上万个文件,光显示都要很长时间,这不行。 但还是十分感谢
Originally posted by NaturalJ0 at 2006-10-28 07:56: 如果没有连接,难道不会出现 A F R 选择? dir f:\ (如果没有连接会提示什么?)
附件 1: SCREEN04.jpg (2006-10-29 00:38, 13.33 K, 下载附件所需积分 1 点 ,下载次数: 2) 附件 2: SCREEN05.jpg (2006-10-29 00:38, 13.12 K, 下载附件所需积分 1 点 ,下载次数: 2)