How do I delete a file, given the full path to the file?
- 1What error are you receiving?Ian P– Ian P2010-09-03 12:24:59 +00:00Commented Sep 3, 2010 at 12:24
- No i am not receiving error , i want to delete that particular file Block3.xml stored in that particular directory i am not able to judge the syntax for deletemahesh– mahesh2010-09-03 12:29:28 +00:00Commented Sep 3, 2010 at 12:29
- 3did you look it up? System.IO.File.Delete.John Saunders– John Saunders2010-09-03 12:35:05 +00:00Commented Sep 3, 2010 at 12:35
Add a comment |
5 Answers
You want File.Delete.
File.Delete(@"C:\Documents and Settings\Vijay.EKO-03\Desktop\blockseek3-9-2010\Block3.xml");