I am copying list of files from source directory to destination directory, i need to check duplicate file name before copying..
Thanks..
I am copying list of files from source directory to destination directory, i need to check duplicate file name before copying..
Thanks..
Just wondering, would this be sufficient?
As manual says ( http://ant.apache.org/manual/Tasks/copy.html ):
As this would be a low effort solution. Otherwise, I think you need to create your own ant task.
UPDATE:
OK, so I checked the sources of ant copy task, and I believe you can do the required by extending it in your subclass (new ant task). As I assume you're running multiple files copying instead of just one.
So you need to:
org.apache.tools.ant.taskdefs.Copy
Here is a more complete implementation:
With this implementation, two filesets inside same copy task can fail: