Suppose I have some commands in a bat file :
echo 1 copy existingFile1 c: echo 2 copy existingFile1 notExistingDrive: echo 3 attrib -r attrib notExistingFile
Those are just demos of commands that contains successful commands and also "not-ran-to-completion" return codes.
Is there any way I can get an indication that at least one operation has not-ran-to-completion ?
do something1 do something2 do something3 if noErrorsAll(something1,something2,something3) do something4
NB I prefer not to check everytime "if exists".There can be other halts than "not-exists"