How can I copy a file and save it to a new specified folder?
String pathOne = "path";
File file1 = new File(pathOne);
String pathTwo = "path";
save file1 to new directory
How can I copy a file and save it to a new specified folder?
String pathOne = "path";
File file1 = new File(pathOne);
String pathTwo = "path";
save file1 to new directory
You can use apache commons library. It has FileUtils class that makes that kind of operations easy
https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/FileUtils.html
in your case copyFile(File srcFile, File destFile) function is what you are looking for