Search code examples
batch-filedos

DOS concatenated commands order of precedence


What is wrong with the code below, that is intended to only report something is done if it returns cleanly:

echo Other operations here & (echo Trying to launching Firefox & "%ProgramFiles(x64)%"\Mozilla\Firefox\Firefox.exe && echo Firefox has closed successfully) & echo More operations that should be done regardless here

Solution

  • Sorry guys, this syntax works, there was other issues with the surrounding code that I didn't realise. Don't suppose anyone knows of a better way to debug DOS "scripting", it's almost as bad as VBS error messages!