ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aloizio Pereira da Silva <aloi...@dcc.ufmg.br>
Subject getting the variable value from DOS using ANT
Date Fri, 24 Oct 2003 11:50:32 GMT
Hi everybody,

How could I obtain a variable value from DOS using ANT? For example, I
need
to know which is the value of the errorlevel variable that is available in
DOS after a run of program.

I have been using this in a batch file as shown below:

<run_program_qftest>
   if %errorlevel% ==  0 set msg_qftestC0=%qft_teste% - %msg0%
   if %errorlevel% ==  1 set msg_qftestC0=%qft_teste% - %msg1%
   if %errorlevel% ==  2 set msg_qftestC0=%qft_teste% - %msg2%
   if %errorlevel% ==  3 set msg_qftestC0=%qft_teste% - %msg3%
   if %errorlevel% == -1 set msg_qftestC0=%qft_teste% - %msg-1%
   if %errorlevel% == -2 set msg_qftestC0=%qft_teste% - %msg-2%
   if %errorlevel% == -3 set msg_qftestC0=%qft_teste% - %msg-3%
   if %errorlevel% == -4 set msg_qftestC0=%qft_teste% - %msg-4%
   if %errorlevel% == -5 set msg_qftestC0=%qft_teste% - %msg-5%
   if %errorlevel% == -6 set msg_qftestC0=%qft_teste% - %msg-6%
   echo %msg_qftestC0%



Thanks

            *****************************************************
            *         Federal University of Minas Gerais        *
            *          Department of Computer Science          *
            *         Master Degree in Computer Science         *
            *                                                   *
            *                 Aloizio Silva                     *
            *         http://www.dcc.ufmg.br/~aloizio          *
            *                                                   *
            *      Mobile Computer and Network Optimization     *
            *****************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message