Use <basename>. Are you sure you need <foreach>? Sometimes there's something
in Ant official that does a hidden <foreach>, like <apply> for example. I'm
asking, just in case... --DD

-----Original Message-----
From: Gavin Simpson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 13, 2002 10:43 AM
To: '[EMAIL PROTECTED]'
Subject: stripping of file name extension

Hi,

I'm using the following <foreach> command within ant-contrib to iterate
through a bunch of files with a .xml extension. I wish to further process
the file name retruned in property "var" to remove the file extension
(.xml). How can I go about doing this?

Thanks in advance,
Gavin.

        <target name="foreach">
                <foreach target="loop" param="var">
                        <fileset dir="."/>
                </foreach>
        </target>

        <target name="loop">
                .
                .
                .
                .
        </target>


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

Reply via email to