ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joyce Li <...@dwl.com>
Subject Re: Moving a set of directories.
Date Wed, 14 Aug 2002 14:47:51 GMT
I tried all the suggestions but nothing seems to work.  I am using Ant 1.5 on
Windows 2000 and Linux.
The problem only exists if I'm moving a directory to be under a new directory.
If I just simply rename the source directory, it works.  So the following code
would work

<move todir="${base.dir}/tardir">
            <fileset dir="${base.dir}/srcdir"/>
 </move>

That would rename srcdir to tardir.
And the following code would not delete the srcdir  because I'm trying to move
srcdir under tardir:

<move todir="${base.dir}/tardir"
           includeEmptyDirs="yes">
        <fileset dir="${base.dir}"
                    defaultexcludes="no">
                <include name="src/**/*.*"/>
                <include name="src"/>
        </fileset>
</move>


Looks like I'll have to either rename each directory individually or do an extra
delete operation after the move.
I appreciate all the help.


Joyce


Martin Gainty wrote:

> Joyce:
>
> to Move a set of files to a new directory
>
>   <move todir="some/new/dir" >     //the exact target directory
>     <fileset dir="my/src/dir" >    //the exact src directory
>       <include name="**/*.jar"/>   //include these files
>       <exclude name="**/ant.jar"/> //exclude these files
>     </fileset>
>   </move>
>
> Keep us apprised,
> -Martin
>


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


Mime
View raw message