开发者

Get filenames only from full path

开发者 https://www.devze.com 2022-12-18 14:11 出处:网络
I am using an Ant script to get the contents of a directory by means of the following: <ac:foreach target=\"process-test\" param=\"the_file\" delimiter=\",\">

I am using an Ant script to get the contents of a directory by means of the following:

<ac:foreach target="process-test" param="the_file" delimiter=",">
    <path>
        <fileset dir="${test.suite.url}">
            <include name="**/*.html"/>
     开发者_开发问答       <exclude name="**/cases/"/>
        </fileset>
    </path>
</ac:foreach>

This is returning the full path to the file (which is something I also need) but, is it possible to strip away the path and give me just the filename?


Isn't the Ant <basename> task the thing you are looking for?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号