我想把foldera里面的文本文件移到folderb。但是,文件夹本身移动了,而不是里面的文件。有人能告诉我如何更改下面的代码吗?
File source = new File("d:/files/folderA/");
File target = new File("d:/files/folderB/");
boolean success = source.renameTo(new File(target, source.getName()));
if (!success) {
// File was not successfully moved
}
暂无答案!
目前还没有任何答案,快来回答吧!