Hi again, I now have a problem where I rename a file, and delete another one, and neither one of the actions are actually happening.
It looks like this:
I have nothing happening after this, yet when I go to check if anything happened, both files are still there, and neither have been renamed. To prove it, the data that I entered into rflie4 before renaming it is still there (and the file is called "temp"). The System.out.println statement returns "C:\Users\John\workspace\Various classes\temp.txt" when it should return "C:\Users\John\workspace\Various classes\points.txt."


LinkBack URL
About LinkBacks
Reply With Quote
It guess the only way this will work is doing what copeg suggested?
Ok, so what needed to happen is that I had to delete/rename the files after I closed the FileInputStream, which I wasn't doing before. However, there is still a small problem. I can only either delete one or rename the other. For example, if I delete rfile first then I can't rename rfile4. If I rename rfile4 first then I can't delete rfile. Any ideas on how I should do this?








*



