recursion problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yyaseminugur
    New Member
    • Sep 2006
    • 1

    #1

    recursion problem

    i'm trying to list all folders within a specified directory.
    it's possible to do that with the code below.but it is only 1 level deep.how can i go deeper???
    how can i list c:\documents and settings\all users\music

    any help?

    Dim oFso As Object
    Dim oFolder
    Dim oSubFolder

    Private Sub Form_Load()
    Set oFso = CreateObject("S cripting.FileSy stemObject")
    Set oFolder = oFso.getfolder( "c:\")

    For Each oSubFolder In oFolder.subfold ers
    List1.AddItem oSubFolder.Path
    Next

    End Sub
Working...