我的嵌套 if 语法有问题,我不断收到错误:
'ELSE' is not recognized as an internal or external command, operable program or batch file
这是功能:
: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%"
谢谢!!