开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜