The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


File renameTo and delete methods

Posted by Mike on December 05, 2000 at 8:32 PM

I can not get these methods to work. They do not do anything to the files that they are supposed to rename or delete and they both return false. Also, all the files are within the same directory as the application. Am I doing something wrong? Here's some sample code:

// move the file from currFile to destFile
File currFile = new File("inbox/message");
File destFile = new File("trash/message");

Please help!


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us