vb.net - Delete the file which contains a string in its name -


I want to delete a file if there is a word in it I might be able to find the file if it contains a specified word If the path is, then the string = IO.Directory.GetFiles (% AppData% & amp; "\ etc", "* Chrome *"), as

  dim path () Length & gt; 0 Then delete the file?  

What is the correct way to delete a file?

This should be the job:

slow path = IO.Path Select each FL file in FL.Contains (Filters) in Combine (Environmental.GETFolderPath (Environment.SpecialFolder.ApplicationData), "etc.") Dim Filter = "Chrome" Dim Files = IO.Directory.GetFiles (Path) IO.File.Delete (fl) Next

Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -