
import java.io.*;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
import java.io.InputStream;
import java.nio.file.Paths;
import java.nio.channels.FileChannel;
import java.nio.file.StandardCopyOption.*;
import java.io.FileNotFoundException;
public class Test {
public static void main(String[] args) {
File source = new File("C:\\From\\figures.txt");
File target = new File("C:\\To\\figures.txt");
Path p1 = Paths.get("C:\\Temp\\source.txt");
Files.copy(source, target, REPLACE_EXISTING);
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.