ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Halstead, Chris" <Chris.Halst...@delta.com>
Subject RE: Renaming a directory when the source directory is not known
Date Mon, 14 Apr 2003 22:59:59 GMT
Thanks for trying, but I'm having no luck.  I'll start fresh in the morning....

-chris

----Original Message-----
From: Sebastien Blanc
Sent: Monday, April 14, 2003 6:27 PM
To: Ant Users List
Subject: Re: Renaming a directory when the source directory is not known


the first move try will move the output.dir under the output.dir/target dir value.
u need to use include for instance to move a set of file in ur fileset:
first try to <include name="*"/> or **/* in your move task.

  <move todir="${output.dir}/${target}">
    <fileset dir="${output.dir}">
      <include name="**/*"/>
    </fileset>
  </move>

seb.

"Halstead, Chris" wrote:

> I tried this first:
>
>   <target name="PREP">
>         <move todir="${output.dir}/${target}">
>                 <fileset dir="${output.dir}"/>
>         </move>
>   </target>
>
> This gave me /some/dir/bar/foo instead of /some/dir/bar.
>
> I then tried the mapper listed below (<mapper type="glob" from="${output.dir}/*" to="${output.dir}/${target}"/>)
instead of the <move> task.  This did nothing.
>
> I'm just at a loss....
>
> -chris
>
> -----Original Message-----
> From: Sebastien Blanc
> Sent: Monday, April 14, 2003 6:08 PM
> To: Ant Users List
> Subject: Re: Renaming a directory when the source directory is not known
>
> no, paths are alrite too. how are u using your mapper then ?
> seb.
>
> "Halstead, Chris" wrote:
>
> > I tried  <mapper type="glob" from="${output.dir}/*" to="${output.dir}/${target}"/>,
where ${target} is the name I want it to have.  This did nothing...does mapper only work with
files?
> >
> > -chris
> >
> > -----Original Message-----
> > From: Sebastien Blanc
> > Sent: Monday, April 14, 2003 5:52 PM
> > To: Ant Users List
> > Subject: Re: Renaming a directory when the source directory is not known
> >
> > did u try using a <mapper> (type="glob" or so) instead of move ?
> > seb.
> >
> > "Halstead, Chris" wrote:
> >
> > > OK, this has been driving me nuts.  I'm trying to figure out how to rename
a directory when the original directory name is not known beforehand (or is variable), such
as when unpacking an archive with an arbitrary base directory.
> > >
> > > e.g.:
> > >
> > > I unpack a ZIP archive to /some/dir and end up with /some/dir/foo/...
> > >
> > > I want to rename /some/dir/foo to /some/dir/bar, but I don't want to hard code
a reference to /some/dir/foo 'cuz it may change.
> > >
> > > Anyone have a clue?  I'm stumped.
> > >
> > > Thanks in advance.
> > >
> > > -chris
> > >

Mime
View raw message