ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conelly, Luis (GNF, Contractor)" <>
Subject RE: Requirement to copy from local drive to network drive
Date Wed, 12 May 2004 14:36:56 GMT
I have achieved what you want with:

    <target name="copyFile">
        <copy todir="${}" >
          <fileset dir="${param.mail.dist.dir}">
              <include name="**/*.zip"/>
              <include name="**/*.jar"/>
          <mapper type="glob" from="*" to="${DSTAMP}-*"/>

${} is defined as an UNC path [\\server\sharedresource\directory]
If you define it in a properties file (as I do) you should escape the backslashes, in order
to be well-interpretated by java.util.Properties class; otherwise, you can define it as is.

This has the advantage that works for Win and for *nix, since the path is not hardcoded at
all and can be defined for your favorite OS.


-----Original Message-----
From: []
Sent: Wednesday, May 12, 2004 1:03 AM
Subject: RE: Requirement to copy from local drive to network drive 

> I have a zip file . I would like to copy from my local drive 
> to my network
> drive . Can we accomplish this in Ant 1.6.1

I don´t know how you can access your network drive.
If your local machine runs under windows you can map a drive letter
via <exec executable="cmd.exe"><arg line="net use ${letter}

Maybe the <copy> supports UNC - don´t know. You should try that out.

> How to make a zip file with a time stamp .?

First <zip>, then <touch>.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message