String path1 = "D:" + File.separator + "test.pdf";
String path2 = "E:" + File.separator + "test.pdf";
File sourceFile = new File(path1);
sourceFile.renameTo(new File(path2));
文件移动
最新推荐文章于 2024-01-31 19:35:09 发布
String path1 = "D:" + File.separator + "test.pdf";
String path2 = "E:" + File.separator + "test.pdf";
File sourceFile = new File(path1);
sourceFile.renameTo(new File(path2));