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 Struts and the fly likes Remove file 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 » Frameworks » Struts
Bookmark "Remove file" Watch "Remove file" New topic
Author

Remove file

MInu
Ranch Hand

Joined: Oct 09, 2003
Posts: 517
Hi all,

I am using Struts Upload api to upload a file to the server,that is working fine.But i need to delete that file from the application itself,what can i do for that? Is there any api for that..

Please help me on this..

Thanks in advance


God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
java.io.File myFile = new java.io.File("c:\myFile");
myFile.delete();


Merrill
Consultant, Sima Solutions
MInu
Ranch Hand

Joined: Oct 09, 2003
Posts: 517
Thanks..

One more thing... once i uploaded the file,if it is there in the specific folder i have to get some value(boolean/String) in my code.How can i get this.

Thanks...
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Vinod,

I'm afraid I don't understand your question. Could you explain in greater detail what it is you're trying to do?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Remove file
 
Similar Threads
how to read the multipart form-data file content in servlet?
Convert InputStream to a File in Memory
to store user uploaded photos
FileUpload Word,PDF, Excel Files
Multiple file upload