我正在创建Java软件,将文件夹移动到同一台计算机上其他用户的另一个文件夹,但是在移动文件和文件夹时遇到了一些问题
private void bMoveFoldersActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
File file = new File(diretorioPastaOrigem.getText());
File file2 = new File(diretorioPastaDestino.getText());
// renaming the file and moving it to a new location
if(diretoryFinalFolder== null || diretoryInicialFolder== null) {
System.out.println("ERRO ");
}
else
{
this.diretoryInicialFolder.copy();
this.diretoryFinalFolder.paste();
}
}