IO-移动文件

xiaoxiao2021-02-27  354

// 移动文件 "C:/Users/Haogang Chen/Desktop/Excel/E/hg.xls" // 到 "C:/Users/Haogang Chen/Desktop/Excel/F/hg.xls" String path0= "C:/Users/Haogang Chen/Desktop/Excel/E/hg.xls" String path = "C:/Users/Haogang Chen/Desktop/Excel/F/"; File file = new File(path0); //成功返回true file.renameTo(new File(path + file.getName()));
转载请注明原文地址: https://www.6miu.com/read-7217.html

最新回复(0)