This may be so simple I'm over looking things, but I'm having trouble with if logic using "IF DEFINED" syntax.
For instance, I would like for this to work:
Code: Select all
IF DEFINED ERR_FILE IF DEFINED FDMEE_ERR (
SET "SW_ATTACH=%LOGFILE%|%ERR_FILE%|%INTRAPATH%%MONTHPOV%%YEARPOV%_%MAXFILE%"
MOVE /Y "*.log" "%INTRAPATH%" >nul 2>&1
) ELSE IF NOT DEFINED ERR_FILE IF DEFINED FDMEE_ERR (
SET "SW_ATTACH=%LOGFILE%|%INTRAPATH%%MONTHPOV%%YEARPOV%_%MAXFILE%"
) ELSE (
SET "SW_ATTACH=%LOGFILE%"
)
Code: Select all
SET "SW_ATTACH=%LOGFILE%"
IF DEFINED ERR_FILE IF DEFINED FDMEE_ERR (
SET "SW_ATTACH=%LOGFILE%|%ERR_FILE%|%INTRAPATH%%MONTHPOV%%YEARPOV%_%MAXFILE%"
MOVE /Y "*.log" "%INTRAPATH%" >nul 2>&1
)
IF NOT DEFINED ERR_FILE IF DEFINED FDMEE_ERR (
SET "SW_ATTACH=%LOGFILE%|%INTRAPATH%%MONTHPOV%%YEARPOV%_%MAXFILE%"
)