How to copy file from one location to another location in Java?
I want to copy and paste a file from one location to another location in Java, Is there any one liner solution available?
1 Answer
7 years ago by Divya
Files.copy(Paths.get("/from/location/foo.txt"), Paths.get("/to/location/foo.txt"));
7 years ago by Karthik Divi