ghquick wrote:
> setlocal ENABLEDELAYEDEXPANSION enableextensions
> for /F "eol=; tokens=1,2 delims=," %%I in (token.txt) do (
> CMD /V:ON /CE:EXIT99B.CMD <\nul
> echo !ERRORLEVEL!
> )
> echo !ERRORLEVEL!
Something is missing. At the very least the latter errorlevel output
is confusing. There is no program that produces the errorlevel. An
errorlevel is to be produced by the immediately preceding program.
The general idea is this
operation1
errorlevel
operation2
errolevel
Anything else in between, or a missing operation confuseses the
errorlevel results.
Furthermore, if you need an earlier errorlevel later, the very first
thing is to store it into another, regular variable, because anything
following will destroy the errorlevel produced.
All the best, Timo
--
Prof. Timo Salmi ftp &
http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
private.php?do=newpm&u= <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Useful script files and tricks
ftp://garbo.uwasa.fi/pc/link/tscmd.zip