Da documentação de if
na linha de comando (via help if
ou disponível no TechNet também).
The ELSE clause must occur on the same line as the command after the IF. For example:
IF EXIST filename. ( del filename. ) ELSE ( echo filename. missing. )
The following would NOT work because the del command needs to be terminated by a newline:
IF EXIST filename. del filename. ELSE echo filename. missing
Nor would the following work, since the ELSE command must be on the same line as the end of the IF command:
IF EXIST filename. del filename. ELSE echo filename. missing
Então, seu script funcionaria se você substituísse
IF EXIST pippo.finalBests.csv (call behaviorsearch_headless.bat -p test_behaviorsearch.bsearch -o topolino)
else goto :eof
com
IF EXIST pippo.finalBests.csv (call behaviorsearch_headless.bat -p test_behaviorsearch.bsearch -o topolino) else goto :eof
OR
IF EXIST pippo.finalBests.csv (
call behaviorsearch_headless.bat -p test_behaviorsearch.bsearch -o topolino
) else (
goto :eof
)
Espero que ajude.