Thanks, that was the right pointer I needed. Here's the code that I'm using
now so others mught benefit from it, or maybe improve on it.

        <move todir="${src.dir}">
            <fileset dir="${src.dir}">
                <include name="**/*.jsp"/>
            </fileset>
            <mapper type="regexp" from="^(.*)Form(.*)\.jsp$$"
to="\1\2.jsp"/>
        </move>

Iwan

> -----Original Message-----
> From: Jim Fuller [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, February 22, 2004 11:17 AM
> To: 'Ant Users List'
> Subject: RE: [Ant 1.5.4] HowTo rename a set of files?
> 
> 
> > From: Iwan [mailto:[EMAIL PROTECTED]
> > Sent: 21 February 2004 23:46
> > Subject: [Ant 1.5.4] HowTo rename a set of files?
> 
> > I've got a set of files in a directory:
> > 
> >     CreateClientForm.jsp
> >     CreateClientForm.properties
> >     CreateClientFormContent.jsp
> >     CreateClientFormTitle.jsp
> > 
> > And I want to rename them to:
> > 
> >     CreateClient.jsp
> >     CreateClient.properties
> >     CreateClientContent.jsp
> >     CreateClientTitle.jsp
> > 
> > I know I can do this by hand, and even by having multiple
> > move-statements, but I'm sure that Ant can do this for me, I 
> > just don't know how. So hopefully somebody on the list knows how to?
> 
> Use either the glob or probably in your case the regexp file 
> <mapper/> nested within the <move/> or <copy/> task.
> 
> gl, Jim Fuller
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to