开发者

How to add one line to a set of files in Ant?

开发者 https://www.devze.com 2023-02-27 07:01 出处:网络
Is it possible to add one line to a set of files in Ant? basicall开发者_如何学Goy i have a folder which has sub-folders, each subfolder contains different types of files, such as xml files, cmd files,

Is it possible to add one line to a set of files in Ant? basicall开发者_如何学Goy i have a folder which has sub-folders, each subfolder contains different types of files, such as xml files, cmd files, etc. Now I need to add one line to all cmd files under that folder. have searched around for a while, but couldn't find a clue.

Is it possible in Ant?


This should be possible using the copy task with a filterchain. This filterchain would contain a concatfilter with an append attribute pointing to a file containing the line to add.

See http://ant.apache.org/manual/Types/filterchain.html#concatfilter and http://ant.apache.org/manual/Tasks/copy.html for details.

0

精彩评论

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

关注公众号