ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: How to move a directory ?
Date Tue, 31 Aug 2004 21:46:53 GMT
I have just committed a change I have had sitting
around for awhile now.  There may be something else at
work here, like another process using that directory,
depending on your environment.  In any event, a simple
move/rename of a directory is much faster with the CVS
version of Ant using <move>'s "file" attribute instead
of a nested <fileset>.

Thanks,
Matt

--- bhaskar_karambelkar@freddiemac.com wrote:

> Sorry but, this does not work, it copies the
> contents of source directory 
> into target, not the source directory itself.
> btw I am using Ant 1.6.2 on Solaris 8.0.
> 
> bhaskar
> 
>  <copy todir="target">
>      <fileset dir="source">
>          <include name="**/*"/>
>      </fileset>
>  </copy>
> 
>  
> 
> -----Original Message-----
> From: bhaskar_karambelkar@freddiemac.com
> [mailto:bhaskar_karambelkar@freddiemac.com] 
> Sent: Tuesday, August 31, 2004 12:27 PM
> To: Ant Users List
> Subject: How to move a directory ?
> 
> 
> this may sound a bit silly , but I am at my wits
> end. 
> I want to move a directory (and all its contents )
> from one directory
> into 
> another directory
> 
> e.g.
>  Move dir1 (e.g. /src/dir1) into /dest/dest1. i.e.
> /dest/dest1/dir1
> 
> I have tried the following 
> <move todir="/dest/dest1" overwrite="true" >
>         <fileset dir="/src" includes="dir1/**/*" />
> </move>
> 
> This does indeed create a /dest/dest1/dir1 with all
> the contents for
> dir1, 
> but it also leaves a empty /src/dir1, back
> in the source. How do I get rid of this empty dir ?
> I don't want to add 
> another delete statement after the move statement.
> I have also tried other stuff, none of which works.
> any clues ? thanks
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message