使用ant,查找与正则表达式匹配的文件

时间:2014-06-26 13:21:27

标签: java maven ant izpack

我有一个包含2个子目录的目录,其中一个目录有一个名为

的文件

dictionary_FR.properties dictionary_EN.properties

我想用ant

搜索这些文件

谢谢

1 个答案:

答案 0 :(得分:1)

<fileset dir="loc_of_dir_containing_the_sub_dirs" id="xyz">
      <include name="**/dictionary_*.properties"/>
    </fileset>

<pathconvert pathsep="," property="my_files" refid="xyz"/>

${my_files}将包含模式dictionary_XX.properties中指定的所有文件的地址。