• Post Reply Bookmark Topic Watch Topic
  • New Topic

I cannot delete a file.  RSS feed

 
Anthony Smith
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
File myFile = new File(dir, file);
System.out.println(myFile.isFile() + file + " " + myFile.delete());
System.out.println(myFile.getAbsolutePath());

There is my simple code and here is the output:

truebackup.zip false
C:\var\gsp\portal_docs\vp\backup.zip

What am I doing wrong?
 
Abdulla Mamuwala
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See if you can get hints from this forumhttp://forum.java.sun.com/thread.jspa?threadID=446310&messageID=2020509
 
lee honw
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe the file only read.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!