Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

How can i delete all the files on a folder programatically?

how can i delete all the files from a folder programatically?
I'm using VB. NET 2005

Thanks
0
jsctechy
Asked:
jsctechy
  • 2
1 Solution
 
MikkkCommented:
Dim s As String
For Each s In System.IO.Directory.GetFiles("C:\WINDOWS\TEMP")
   System.IO.File.Delete(s)
Next s
0
 
jsctechyAuthor Commented:
Thanks.
0
 
MikkkCommented:
You'r Welcome. Pleased to help
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now