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.
精彩评论