This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes File Rename Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "File Rename " Watch "File Rename " New topic
Author

File Rename

Chris Ramsey
Ranch Hand

Joined: Sep 15, 2003
Posts: 34
Hello, I have tried everything from past posts to try and resolve a file renaming issue I am having. Files have correct permissions and exist in different directories at the time the rename is attempted.

Can anyone see any issues with my code? Thank you.
Sri Ram
Ranch Hand

Joined: Oct 03, 2005
Posts: 118
Can anyone see any issues with my code? Thank you.


I dont see any issue with this code dude. Its executing properly and its changing the file name also.
Chris Ramsey
Ranch Hand

Joined: Sep 15, 2003
Posts: 34
Why isn't it renaming the file?
Chris Ramsey
Ranch Hand

Joined: Sep 15, 2003
Posts: 34
I found the problem! The orinigal file is created in another method. I did not close the file before trying to rename. Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Rename
 
Similar Threads
Doubt:Sequence of the output
rename file
renameTo() problem
Array IndexOutOfBounds Exception
File upload into project structure