Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to delete all files in a specific folder using VB ?
#5
I believe that you are looking for something like this:
Code:
Dim DirectoryInfo As New System.IO.DirectoryInfo(Environment.SpecialFolder.Cookies)
        Dim FileInfo() As System.IO.FileInfo = DirectoryInfo.GetFiles("*", IO.SearchOption.AllDirectories)
        For Each f In FileInfo
            My.Computer.FileSystem.DeleteFile(f.FullName)
        Next

Please note that this deletes cookies from Internet Explorer
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Re: Please help me! - by Vinwarez - 03-12-2012, 10:29 AM
Re: Please help me! - by Himansh - 03-13-2012, 12:38 AM
Re: Please help me! - by Vinwarez - 03-13-2012, 02:51 AM
Re: Please help me! - by brandonio21_phpbb3_import2 - 03-13-2012, 02:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to search multiple files for one string ryan 1 8,851 06-18-2012, 06:04 PM
Last Post: brandonio21
  Files in a listbox Hurricane 4 18,169 02-27-2012, 03:32 PM
Last Post: brandonio21
  Get Files from the C drive Protection4Real 3 13,556 02-10-2011, 07:59 AM
Last Post: Protection4Real

Forum Jump:


Users browsing this thread: 1 Guest(s)