Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
rename all files matching pattern in directory and below

rename all files matching pattern in directory and below

2007-05-30       - By Mark
Reply:     1     2  

Hello,

I want to make a task to rename all files of pattern
abc*.htm to index.htm recursively.

I tried following the example toward the end of the
Move task documentation (i.e. adding a .bak extension
to all files) but that didn't work.

This is what I did:

<move todir="topdir/html" includeemptydirs="false">
 <fileset dir="topdir/html">
   <include name="**/abc*.htm"/>
 </fileset>
 <mapper type="glob" from="abc*.htm" to="index.htm"/>
</move>

None of the files were renamed.

None of the directories will have more than one file
matching the pattern so that shouldn't be an issue.

Can someone offer a suggestion on what is wrong or how
I should go about doing this?

Thanks,

Mark




_______________________________________________________________________________
_____
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.