on ‎2013 Dec 31 7:10 AM
Hi All
I am using the JXL API for uploading Excel File into the WD JAVA application. For this, I have to upload the file from Client machine on Server and then create Workbook out of it.
Link to Wiki that I referred is here.
http://wiki.scn.sap.com/wiki/display/WDJava/Uploading+excel+file+using+WebDynpro+for+Java
It is working correctly. However the problem I am facing is that all those files that are uploaded to the server, need to be deleted manually by Administrator. Is there any way we can delete the uploaded file programmatically in the application itself?
Thanx
Deepak Salokhe.
Request clarification before answering.
Hi,
When you uploaded the file you save it on the file system
You can delete it by using the 'delete' method of the 'File' class (this is pure java).
http://docs.oracle.com/javase/7/docs/api/java/io/File.html#delete()
File file = new File("myfilepath");
boolean b = file.delete();
*** Pay attention that you delete the correct file ***
Regards,
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.