lundi 9 décembre 2019

Why need an extra bracket in dos before the else statement?

Why this code does not work?

if exist "D:\Test1" if exist "D:\Test2" (
echo OK
) else (
echo Error
)
pause

This code works but I don't know why this extra brace?

if exist "D:\Test1" if exist "D:\Test2" (
echo OK
)
) else (
echo Error
)
pause

Please help

Aucun commentaire:

Enregistrer un commentaire