I need to write a application to copy files(.jar,.xml,.sql,.exe) from different location to some specific location What would be the most efficient way of file copy using java?
Asked
Active
Viewed 152 times
2 Answers
3
Use java.nio.file.Files.File#copy
which intoduced in java 7. Example -
Files.copy(source, target, REPLACE_EXISTING);

Subhrajyoti Majumder
- 40,646
- 13
- 77
- 103