ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milind Nirgun" <Nirg...@C-IV.org>
Subject RE: Moving a set of directories.
Date Wed, 14 Aug 2002 16:06:27 GMT
If <move> supported <dirset> as a nested element, you could easily do what you
intend to by using
	<move todir="${base.dir}/B" >
	    <dirset dir="${base.dir}/A" defaultexcludes="no" excludes="dir3" />
	</move>
But that doesn't work! Maybe opportunity for a new patch here.
Seems like Move is good for moving files only at the moment.

-Milind

 

> -----Original Message-----
> From: Joyce Li [mailto:jli@dwl.com]
> Sent: Wednesday, August 14, 2002 7:48 AM
> To: Ant Users List
> Subject: Re: Moving a set of directories.
> 
> 
> 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>


--
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