I am having problems with my nested if syntax, i keep getting the error:
'ELSE' is not recognized as an internal or external command, operable program or batch file
here is the function:
:makejunction
set LOCALFOLDER=%~1
set QIFOLDER=%~2
pushd %LOCALFOLDER% 2>nul
IF errorlevel 1 (
IF EXIST %LOCALFOLDER% (
del "%LOCALFOLDER%"
)
)
ELSE
(
rmdir /S /Q "%LOCALFOLDER%"
)
mklink /J "%LOCALFOLDER%" "%QIFOLDER%"
Thank you!!