if exist f:\rologne\cucpdm1.dmp (
if exist f:\rologne\cucpdm2.dmp(
if exist f:\rologne\cucpdm3.dmp(
if exist f:\rologne\cucpdm4.dmp(
if exist f:\rologne\cucpdm5.dmp(
exp system/manager@cucpdm full=y file=f:\rologne\cucpdm1.dmp
)else (exp system/manager@cucpdm full=y file=f:\rologne\cucpdm5.dmp)
)else (exp system/manager@cucpdm full=y file=f:\rologne\cucpdm4.dmp)
)else (exp system/manager@cucpdm full=y file=f:\rologne\cucpdm3.dmp)
)else (exp system/manager@cucpdm full=y file=f:\rologne\cucpdm2.dmp)
) else (exp system/manager@cucpdm full=y file=f:\rologne\cucpdm1.dmp)
echo 备份完成!
echo. & pause
目的是,先判断地:f:\ rologne\下面有没有cucpdm1.dmp ,有的话,就变成2,再判断有没有2,有的话就变成3.......直到5,如果5也存在的话,就覆盖1.
可是运行不起来,请问是哪里出了问题?谢谢
------解决方案--------------------------------------------------------
else 与if 要在同一行上
------解决方案--------------------------------------------------------
if not exist f:\rologne\cucpdm1.dmp (exp system/manager@cucpdm file=f:\rologne\cucpdm1.dmp full=y) else (
if not exist f:\rologne\cucpdm2.dmp (exp system/manager@cucpdm file=f:\rologne\cucpdm2.dmp full=y) else (if
not exist f:\rologne\cucpdm3.dmp (exp system/manager@cucpdm file=f:\rologne\cucpdm3.dmp full=y) else (if
not exist f:\rologne\cucpdm4.dmp (exp system/manager@cucpdm file=f:\rologne\cucpdm4.dmp full=y) else (if
not exist f:\rologne\cucpdm5.dmp (exp system/manager@cucpdm file=f:\rologne\cucpdm5.dmp full=y) else (exp
system/manager@cucpdm file=f:\rologne\cucpdm1.dmp full=y)))))
echo 备份完成!
pause