happiness. Net delete files from a directory
To delete code. Net files with the extension. "Tmp" in a particular directory can use the following algorithm.
For Each foundFile As String In My . Computer.FileSystem.GetFiles (directory, FileIO.SearchOption.SearchAllSubDirectorios, "*. tmp" )
My . Computer.FileSystem.DeleteFile ( foundFile, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
Next
Source Msdn
0 comments:
Post a Comment