View Single Post
  #6 (permalink)  
Old 11-08-2008, 5:51 PM
shawnplr shawnplr is offline
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: May 2007
Posts: 41
Reputation: 37
shawnplr is on a distinguished programming path ahead
Default

Sorry if my guess is wrong. Judging by the name of your bat file. If you are deleting all files in a folder then you can use this.
Code:
For Each foundFolder As String In My.Computer.FileSystem.GetDirectories("C:\Test")
            My.Computer.FileSystem.DeleteDirectory(foundFolder, FileIO.DeleteDirectoryOption.DeleteAllContents)
        Next
For Each foundFile As String In My.Computer.FileSystem.GetFiles( "C:\Test", FileIO.SearchOption.SearchAllSubDirectories, "*.*")
            My.Computer.FileSystem.DeleteFile(foundFile, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
        Next
I modified the code from here.

Last edited by shawnplr; 11-08-2008 at 7:06 PM.
Reply With Quote