【发布时间】:2012-12-31 11:34:19
【问题描述】:
我正在编写一个批处理脚本来进入一个文件夹,如果它存在就做某件事,如果它不做其他事情
我的层次结构如下:-
C:\Validation\docs\chm\help.chw
我想转到这个“help.chw”文件,这就是我正在做的事情并得到错误
IF EXIST docs (
CD docs echo curr dir = %CD% goto imagefolder
)
IF EXIST docs (
CD docs echo curr dir = %CD% goto imagefolder
)
ECHO Please include 'docs' folder in the current working directory
ECHO.
ECHO The program would close now , restart the batch file after making the changes cited above
ECHO.
goto exit
这是我写的
IF EXIST docs (
CD "docs"
echo curr dir = %CD%
goto imagefolder
)
它给了
C:\Validation MSI
【问题讨论】:
标签: batch-file batch-processing cmd