Click here to Skip to main content
15,908,175 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to delete a file from Upload folder.and for that a path is given below.but the question is how to get a file name....




string path = Server.MapPath(G:/BuidMyPc/Build My PC/Upload/ + );
system.Io.File.Delete(path);
Posted
Updated 21-Mar-13 1:38am
v3
Comments
Kuthuparakkal 21-Mar-13 1:57am    
Not clear, explain
Karthik Harve 21-Mar-13 2:00am    
what is "fuimageID.filename" ?
Ankit Gajera 21-Mar-13 7:40am    
ok. change ..now how to get file name......

1 solution

If you delete file from web site just move the one folder to another folder(i.e Upload folder to Delete_Upload) folder).

then automatically you can get the file name from delete_upload folder using File class [^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900