home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 41,789 of 42,547   
   Herbert Kleebauer to Anton Shepelev   
   Re: A failed output redirection does not   
   11 Nov 19 20:55:05   
   
   From: klee@unibwm.de   
      
   On 11.11.2019 18:18, Anton Shepelev wrote:   
      
   > Understood, thank you very much!  So the redirection   
   > itself does not affect ERRORLEVEL.  But why does the   
   > following to:   
   >   
   > @echo off   
   > (type a > C:\NOSUCHNDIR\est.txt ) && goto OK || goto ERROR   
   > :OK   
   > echo All is well.   
   > goto END   
   > :ERROR   
   > echo Error detected.   
   > :END   
      
   I don't know, but I believe &&/|| depends on the exit code   
   of the last function which is not the same as the errorlevel.   
   But Google should know more details.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca