我想将此代码从sh文件转换为.bat文件,该怎么办?
# Validate directories
if [ ! -d "$DIRA" -o
! -d "$DIRB" -o
! -d "$DIRC" ]
then
echo " invalid path"
exit 1
fi
它可以
像这样写.bat文件中:
rem validate directories
set VALID_PATH=true
IF NOT EXIST %DIRA%NUL set VALID_PATH=false
IF NOT EXIST %DIRB%NUL set VALID_PATH=false
IF NOT EXIST %DIRC%NUL set VALID_PATH=false
if %VALID_PATH%==false (
echo invalid path
goto done
)