How do I delete a file, given the full path to the file?
Use Shift + Delete to Force Delete File/Folder. You can select the target file or folder and press Shift + Delete keyboard shortcut to delete the file/folder permanently. This file deletion method won't pass the Recycle Bin.
Locate the item you want to delete, highlight it by left-clicking the file or folder with your mouse once, and press the Delete key.
You want File.Delete.
File.Delete(@"C:\Documents and Settings\Vijay.EKO-03\Desktop\blockseek3-9-2010\Block3.xml");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With