How to use secure delete extension:

Add namespace:
using Microsoft.WinAny.IO; 


Use FileInfo object to delete the file in a secure way:
System.IO.FileInfo fi = new System.IO.FileInfo(@"F:\test_file.txt");
fi.Delete(OverwriteAlgorithm.Gutmann);  


If you want to to apply multiple algorithms at once you can do the following:
System.IO.FileInfo fi = new System.IO.FileInfo(@"F:\test_file.txt");
fi.Delete(OverwriteAlgorithm.DoD_7 | OverwriteAlgorithm.Random | OverwriteAlgorithm.Quick);  

Last edited Aug 23, 2013 at 3:40 PM by josip, version 1

Comments

No comments yet.