On Jun 10, 11:42*pm, za...@construction-imaging.com wrote:
On Jun 10, 4:03*pm, id10t error <tubbz...@gmail.comwrote:
Hello,
I am making a program that will not have an user interaction to delete
certian files. I found this line of code.
My.Computer.FileSystem.DeleteFile("C:\POLLJP.DWN",
FileIO.UIOption.AllDialogs, FileIO.RecycleOption.DeletePermanently)
The problem is that a message box comes up and asks "Are you sure you
want to delete file"file name yes or no". Does anyone know a way
around this. I want it to delete everytime no questions asked .Thank
you
The File.Delete method does not present the user with a nag box. But I
am not sure if it can permanently delete the file.
I think the File class is in the System.IO namespace.
As OP requests, with "DeleteFile" method in My namespace, a file can
be deleted permanently without any user interaction of confirmation,
except errors(see 2nd and 3rd parameters):
My.Computer.FileSystem.DeleteFile("C:\POLLJP.DWN",
FileIO.UIOption.OnlyErrorDialogs,
FileIO.RecycleOption.DeletePermanently)
unless you try to recover with a recovery software of course :)
Thanks,
Onur Güzel