String path1 = "D:" + File.separator + "test.pdf";
String path2 = "E:" + File.separator + "test.pdf";
File sourceFile = new File(path1);
sourceFile.renameTo(new File(path2));
String path1 = "D:" + File.separator + "test.pdf";
String path2 = "E:" + File.separator + "test.pdf";
File sourceFile = new File(path1);
sourceFile.renameTo(new File(path2));