aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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?
 
 
subject: Remove file
 
Similar Threads
how to read the multipart form-data file content in servlet?
FileUpload Word,PDF, Excel Files
Multiple file upload
to store user uploaded photos
Convert InputStream to a File in Memory