Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java how to copy file

var source = new File("src/resources/bugs.txt");
var dest = new File("src/resources/bugs2.txt");

Files.copy(source.toPath(), dest.toPath(), 
           StandardCopyOption.REPLACE_EXISTING);

//Source: http://zetcode.com/java/copyfile/
 
PREVIOUS NEXT
Tagged: #Java #copy #file
ADD COMMENT
Topic
Name
4+2 =