How do I delete a file, given the full path to the file?
Sorry, FileInfo.
open-collar
2010-09-03 12:35:50
A:
Have you tried this??? I think it will solve your problems:
FileInfo i = new FileInfo("PATH TO YOUR FILE");
i.Delete();
Remeber to add:
using System.IO;
David Conde
2010-09-03 12:33:14
+2
A:
You want File.Delete.
File.Delete(@"C:\Documents and Settings\Vijay.EKO-03\Desktop\blockseek3-9-2010\Block3.xml");
Joe White
2010-09-03 12:33:15
+1
A:
Basically, you can just call the static delete method on the file class.
System.IO.File.Delete(@"C:\Documents and Settings\Vijay.EKO-03\Desktop\blockseek3-9-2010\Block3.xml");
Brendan Enrick
2010-09-03 12:34:21