aspose file tools*
The moose likes Java in General and the fly likes File renameTo not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "File renameTo not working" Watch "File renameTo not working" New topic
Author

File renameTo not working

jin sun
Ranch Hand

Joined: Feb 16, 2005
Posts: 30
This is frustrating, I had it working a while ago but now it isn't working. The renameTo is returning false but I deleted the file with the same name that I'm trying to rename and closed the output and input streams. I also checked the permissions. Anyone have a clue what I'm doing wrong? Thanks in advance.


[ June 20, 2005: Message edited by: jin sun ]
Miguel Roque
Ranch Hand

Joined: Oct 24, 2002
Posts: 126
Hi.

A couple of months ago a friend have asked for my help in a similar situation. The renameTo was not working and the problem was on the file path as he was trying to rename with only the file name. Try to include the complete path for the file, for example,



Miguel
jin sun
Ranch Hand

Joined: Feb 16, 2005
Posts: 30
Ohhh ok, thanks a lot Miguel.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: File renameTo not working