Code: Select all
if exist %INIT_DIR%Images\nul (
mkdir "%OUT_DIR%Images"
xcopy /y "%INIT_DIR%Images" "%OUT_DIR%Images" >> %LOG% 2>&1
if ERRORLEVEL 1 (
GOTO ERROR
)
)
When quotes are used "%INIT_DIR%Images\nul" then nothing is found...
Moderator: DosItHelp
Code: Select all
if exist %INIT_DIR%Images\nul (
mkdir "%OUT_DIR%Images"
xcopy /y "%INIT_DIR%Images" "%OUT_DIR%Images" >> %LOG% 2>&1
if ERRORLEVEL 1 (
GOTO ERROR
)
)
Code: Select all
if exist "%INIT_DIR%Images\nul" (
mkdir "%OUT_DIR%Images"
xcopy /y "%INIT_DIR%Images" "%OUT_DIR%Images" >> %LOG% 2>&1
if ERRORLEVEL 1 (
GOTO ERROR
)
)
Code: Select all
@echo off
setlocal
set INIT_DIR=%~1
call :checkIt result "%INIT_DIR%"
echo result=%result%
goto :eof
::::::::::::::::::::::::::::
:checkIt
setlocal
set p=%~a2
(
endlocal
if "%p:~0,1%" == "d" (
set %~1=1
) else (
set %~1=0
)
goto :eof
)