ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David F. White" <>
Subject Re: AW: Easy Question: Rename a Directory
Date Thu, 22 Jul 2004 15:48:49 GMT
At 02:07 AM 07/21/2004, you wrote:
> > There is code in <move> to drop down to File.renameTo where
> > possible. It
> > would be good to understand why this is not happening for
> > you. There may
> > be some condition which is preventing that from working
> > (filtering, for
> > example) or it might be a bug. In any case when it can't
> > rename, <move>
> > goes into copy/delete mode. Can you tell us what is happening in
> > Move.renameFile?
>There is also a little bit logging in the <move> task.
>What does -verbose say?

<move todir="${temp.dir}/newdir" verbose="true">
         <fileset dir="${temp.dir}/olddir"/>

I believe there is a bug in the Ant "Move" task.  When I turn on the 
"verbose" option Ant is performing a rename operation for every child (and 
descendent) file in the directory I want to rename.  For example:

[move]: Attemping to rename: C:\temp\olddir\test.txt to C:\temp\newdir\test.txt

If a directory contains 5000 files this is an expensive operation.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message