f.delete() and f.renameTo() does not work
Hi I am trying to delete a file and rename another one but cannot work!
f.exists() is returning true but f.delete() and f.renameTo() are not working. Any idea why? They worked once and now it is not working!
The variable flight contains "Flight1" and the files exist for sure! :)
File f = new File (flight+".txt");
boolean ans = f.delete();
File f2 = new File (flight+"B.txt");
Thanks a lot