Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to delete all files in a specific folder using VB ?
#1
Hi can Anybody please create an video which tells that "how to delete all files in a specific folder using Visual basic"
because i usually hv to delete files in the folder "prefetch,recent,temp,%temp%" but it becomes very tedious to delete them by entering each folder

please make one video which deals with above problem pls
The Power to Believe in Yourself is the Power to change the Fate!
#2
Hello, Himansh.

I would like to help you, but I do not understand what do you mean.

Regards,
Vinwarez.
Also known as Rocketalypse.
System.out.println("I prefer Java.");
#3
@Vinwarez
hey i mean that i usually delete all files from prefetch,temp
and other folders but it becomes very tedious to go in each folder and delete all the files
can you make a video on vb which tells that how to make a software that automatically delete all files present in a specific folder we want
The Power to Believe in Yourself is the Power to change the Fate!
#4
I know how to make a button which will navigate to specific folders, but I do not know how to make a specific folder to delete itself by a code. I will try to research that. Meanwhile, maybe Brandonio knows and will respond.

Regards,
Vinwarez.
Also known as Rocketalypse.
System.out.println("I prefer Java.");
#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.


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

Forum Jump:


Users browsing this thread: 1 Guest(s)