<target name="getSrc" depends="init">
<copy todir="${pathdir}\${buildtime}" preservelastmodified="true" overwrite="true" includeEmptyDirs="false">
<fileset dir="${srcdir}" >
<and>
<contains text="张建元"/>
<!--size value="512" when="more"/-->
</and>
</fileset>
</copy>
</target>
本文介绍了一种基于文本包含特定字符的文件筛选与复制方法。通过配置文件路径、目标路径及匹配条件,实现对指定目录下含有特定字符串(如“张建元”)文件的筛选,并将这些文件复制到设定的时间戳目录中。此过程还包含了文件属性的保留设置。
579

被折叠的 条评论
为什么被折叠?



