Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 38421 invoked from network); 24 Oct 2003 11:51:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Oct 2003 11:51:54 -0000 Received: (qmail 3430 invoked by uid 500); 24 Oct 2003 11:51:42 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 3388 invoked by uid 500); 24 Oct 2003 11:51:42 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 3288 invoked from network); 24 Oct 2003 11:51:40 -0000 Received: from unknown (HELO agata.dcc.ufmg.br) (150.164.10.143) by daedalus.apache.org with SMTP; 24 Oct 2003 11:51:40 -0000 Received: from sena.dcc.ufmg.br (sena.dcc.ufmg.br [150.164.6.67]) by agata.dcc.ufmg.br (8.12.8/8.12.8) with ESMTP id h9OBpO8A027814 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 24 Oct 2003 09:51:30 -0200 Date: Fri, 24 Oct 2003 09:50:32 -0200 (BRST) From: Aloizio Pereira da Silva To: user@ant.apache.org Subject: getting the variable value from DOS using ANT Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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: 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