try {
File fileBeforeRename = new File("c:\\a.txt");
File fileAfterRename = new File("c:\\b.txt");
boolean result = fileBeforeRename.renameTo(fileAfterRename);
System.out.println(result);
} catch (Exception e) {
e.printStackTrace();
}
File fileBeforeRename = new File("c:\\a.txt");
File fileAfterRename = new File("c:\\b.txt");
boolean result = fileBeforeRename.renameTo(fileAfterRename);
System.out.println(result);
} catch (Exception e) {
e.printStackTrace();
}
No comments:
Post a Comment