By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!That doesn't seem to matter (see below). I thought maybe you could do it manually by looking at _DO_ERRORS, but no. What kind of errors does _DO_ERRORS count?Does 'somecommand' return a nonzero exit code when it fails?
v:\> do z in /L xx yy ( dir %z & echo %_? %_do_errors)
Volume in drive V is DATA Serial number is 6e8a:6d1f
TCC: (Sys) The system cannot find the file specified.
"V:\xx"
0 bytes in 0 files and 0 dirs
492,625,555,456 bytes free
2 0
Volume in drive V is DATA Serial number is 6e8a:6d1f
TCC: (Sys) The system cannot find the file specified.
"V:\yy"
0 bytes in 0 files and 0 dirs
492,625,555,456 bytes free
2 0
v:\> do z in /L xx yy ( dir %z & if %_? != 0 leave )
Volume in drive V is DATA Serial number is 6e8a:6d1f
TCC: (Sys) The system cannot find the file specified.
"V:\xx"
0 bytes in 0 files and 0 dirs
492,625,555,456 bytes free
v:\> do z in /L xx yy ( grep foo %z & if %? != 0 leave )
grep: xx: No such file or directory
v:\>
Code:v:\> do z in /L xx yy ( dir %z & if %_? != 0 leave )
do z in /L xx yy ( dir %z || leave )
Yeah! I like that.Or, a bit shorter,do z in /L xx yy ( dir %z || leave )
It's on the first of the (...) "more options" menus.Inline code, I think. Don't remember where I found that.
Nifty. That's a useful tip.Or, a bit shorter,do z in /L xx yy ( dir %z || leave )
That doesn't seem to matter (see below). I thought maybe you could do it manually by looking at _DO_ERRORS, but no. What kind of errors does _DO_ERRORS count?
Can you give an example? I can't get _DO_ERRORS to be anything but 0._do_errors is incremented on DO syntax errors (like a DO UNTIL that's missing the final argument).