Board logo

标题: 批处理???????? [打印本页]

作者: ab200210     时间: 2007-9-26 18:32    标题: 批处理????????

@echo off
for /l %%a in (1,1,1000) do md 5212\%%a
if not new.exe goto end
dir if /? > new\5212.doc
echo 输入if
:end
为什么电脑说我不应该有goto啊???
作者: yoyodos     时间: 2007-9-26 20:00
if not new.exe goto end
这句的if用的不对吧,是判断是否有new.exe吗?要用if exist new.exe
goto好像没问题
作者: adan     时间: 2007-9-27 20:19
如果需要用否定疑問句的話,應該將"IF NOT"改成"IF NOT EXIST'
作者: dibei     时间: 2007-9-29 13:59
if not new.exe goto end改为if not exist new.exe goto end
作者: ab200210     时间: 2007-9-29 17:48
谢谢啊 知道了