Hi,
Try with the below code :
File f = new File(Source Directory);
File dir=new File(Destinatio n Directory);
boolean success = file.renameTo(n ew File(dir, file.getName()) );
if (success) {
System.out.prin tln("File moved");
}else {
System.out.prin tln("File Not Moved");
}
Cheers,
Sateesh.
Try with the below code :
File f = new File(Source Directory);
File dir=new File(Destinatio n Directory);
boolean success = file.renameTo(n ew File(dir, file.getName()) );
if (success) {
System.out.prin tln("File moved");
}else {
System.out.prin tln("File Not Moved");
}
Cheers,
Sateesh.
Comment