How about using <fixcrlf> task with eol="dos" attribute just after using <echo> task in order to fix the end of lines?
Koji ==================================== Technical Support Blue Martini Software K.K. Shinbashi Chuo Building 6th Floor 1-11-5 Nishi-shinbashi, Minato-ku Tokyo 105-0003 Japan Tel: 81-3-5521-6670 Fax: 81-3-5521-6671 www.bluemartini.co.jp > -----Original Message----- > From: coluf [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 05, 2004 1:04 PM > To: [EMAIL PROTECTED] > Subject: Best means to create a Windows cmd file from ant > > > I wish to create a script file for Windows, that is, a .cmd file > to start my java project. > > It makes sense to create the file from within ant so any changes > to the class path are reflected in the script. > > But what is the best way to create a Windows script file from > within ant? Using <echo> does not terminate the end-of-lines > for Windows correctly (must default for unix?). > > An extract from my ant script... > > <target name="dist" depends="init, jar"> > ... > <pathconvert targetos="windows" property="dist.libs" > refid="build.classpath"/> > <echo file="${dist.bin}/${corename}.cmd">@echo off > setlocal > set classpath=${jar.filename};${dist.libs} > java ${main.class} -cp %classpath% > </echo> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]