View Single Post
  #6 (permalink)  
Old June 12th, 2003, 02:30 PM
DennisTh DennisTh is offline
Registered User
Join Date: Jun 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Thanx for your help - here is the result which does the works :D


    Sub deldir(ByVal targetDirectory As String)
        If Directory.GetDirectories(targetDirectory).Length > 0 Then
            Dim subdirectoryEntries As String() = Directory.GetDirectories(targetDirectory)
            Dim subdirectory As String
            For Each subdirectory In subdirectoryEntries
                Dim dirEntry As File
                dirEntry.SetAttributes(subdirectory, FileAttributes.Normal)
        End If

        Dim fileEntries As String() = Directory.GetFileSystemEntries(targetDirectory)
        Dim fileEntry As File
        Dim sFile As String
        For Each sFile In fileEntries
            fileEntry.SetAttributes(sFile, FileAttributes.Normal)
    End Sub
Reply With Quote