Ant's globmapper does not support more that one "*".
You need to use a regexpmapper, for example:

 <target name="h">
   <delete dir="hh" quiet="yes"/>
   <delete dir="newdir" quiet="yes"/>
   <mkdir dir="hh"/>
   <mkdir dir="hh/subdir"/>
   <touch file="hh/x.html"/>
   <touch file="hh/y.htm"/>
   <touch file="hh/subdir/x.html"/>
   <copy todir="newdir">
     <fileset dir="hh">
       <include name = "**/*.html"/>
       <include name = "**/*.htm"/>
     </fileset>
     <mapper>
       <regexpmapper from="(.*)\.html*" to="\1.xhtml"/>
     </mapper>
   </copy>
 </target>

Robert Soesemann wrote:

While copy HTML files (*.htm or *.html) to another folder, I want to
rename the extension of all those files to *.xhtml.

I tried this, but it didn't work. Can you help? 

<copy todir="${regexp_dir}">
        <fileset dir="${html_dir}">
                <include name="**/*.htm"/>
                include name="**/*.html"/>
        </fileset>
        <mapper type="glob" from="*.htm*" to="*.xhtml"/>
</copy>   

Best regards,

Robert

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