To run batch files you need to specify the dos shell for the executable attribute and specify the batch file as an argument. Something like the following.
<exec executable="cmd.exe"> <arg value="/C"/> <arg value="Sign.cmd"/> </exec> Although, I prefer to re-implement batch files as a macrodefs and use pure ant tasks as much as possible. If your executables are available on other platforms, then this makes your build cross-platform. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 19, 2005 11:13 PM To: user@ant.apache.org Cc: [EMAIL PROTECTED] Subject: usage of exec Hi All, I want to use one of my batch file into my build.xml file, the batch file is as follows: //--------------------------------- Sign.cmd -------- Set NEB_MD5=d:\sign Set NEB_SIGN=d:\sign Set NEB_IMAGE=D:\cdimages\MD1020\MCClient\KAL-Std55-81 Set NEB_IMAGE1=D:\cdimages\MD1020\MCClient\KAL-Std8-5 set DOSUNIX=D:\Uddu d: cd \ REM *** Generate Sign File **** cd %NEB_IMAGE%\ %NEB_SIGN%\signdirectory %NEB_MD5% %NEB_IMAGE%\Client1 %NEB_IMAGE%\Client1 %NEB_SIGN%\signdirectory %NEB_MD5% %NEB_IMAGE%\Client2 %NEB_IMAGE%\Client2 %NEB_SIGN%\signdirectory %NEB_MD5% %NEB_IMAGE%\Client3 %NEB_IMAGE%\Client3 cd %NEB_IMAGE1%\ %NEB_SIGN%\signdirectory %NEB_MD5% %NEB_IMAGE1%\Client1 %NEB_IMAGE1%\Client1 %NEB_SIGN%\signdirectory %NEB_MD5% %NEB_IMAGE1%\Client2 %NEB_IMAGE1%\Client2 //----------------------------------------- The D:\sign folder contains two exe files signdirectory.exe and md5.exe, these two exe files are being used for generating sign files. Can anyone help me out in using this sign.cmd file in my build.xml file, I will be thankful to you. Regards, Pritesh Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]