OK.  I have resolved that Ant will not do this properly.  However, this can
be done in a batch file.  So now the question I have is, how do I get a
newline with the <echo> task?

  <target name="write_bat">
    <echo file="c:\antdir\test.bat" message="pushd \\server\testdir\"/>
    <echo file="c:\antdir\test.bat" append="Yes" message="cd"/>
    <echo file="c:\antdir\test.bat" append="Yes" message="popd"/>    
  </target>

However the batch file (test.bat) looks like:
pushd \\server\testdir\cdpopd


I want the file to have the commands on separate lines.  \n and <br> don't
work with echo.

-Anthony



> -----Original Message-----
> From: Jesse Stockall [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 12, 2001 11:45 AM
> To: Ant Users List
> Subject: RE: pushd and popd
> 
> 
> On Wed, 2001-12-12 at 13:16, Anthony Rodriguez wrote:
> > What I'm really trying to acheive here is to map a network 
> path to a drive
> > letter, then copy files to that path.  The copy utility I'm 
> using was
> > developed in-house and has trouble with UNC paths.  It has 
> other features
> > however that are specific and necessary to my environment.  
> So the idea was
> > to pushd the UNC path, copy to the new drive that pushd 
> assigns, then popd
> > when I'm done.
> 
> Wouldn't "net use z: \\server\share" get you what you need? You could
> use the exec task to map the drive & then use copy
> 
> 
> -- 
>  Jesse Stockall                       |       Tel: 1+ 
> 613.599.2441 ext. 243
>  CRYPTOCard Corporation               |       Fax: 1+ 
> 613.599.2442          
>  Suite 304, 300 March Rd.     |       email: [EMAIL PROTECTED]
>  Ottawa, ON, Canada K2K 2E2   |       web: www.cryptocard.com 
> ---------------------------------------------------------------------
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to