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-04-17 05:18:29 发布
String path1 = "D:" + File.separator + "test.pdf";
String path2 = "E:" + File.separator + "test.pdf";
File sourceFile = new File(path1);
sourceFile.renameTo(new File(path2));