I'm using Apache commons.io library to copy a folder in Windows Programs folder, but when I do that Eclipse Console says:" java.io.IOException: Destination directory cannot be created" How can I resolve it?
My Code:
try {
File srcDir = new File ("test");
File destDir = new File ("C:\\Programs\\test");
FileUtils file = new FileUtils();
file.copyDirectory(srcDir, destDir);
System.out.println("Copied!");
}catch (IOException e) {
System.out.println("error : "+e);
}