Reading the subdirectory tree

Results 1 to 3 of 3

Thread: Reading the subdirectory tree

  1. #1
    Inanna Guest

    Default Reading the subdirectory tree

    With the code below I can get a listing of all the folders in C:Inetpubwwwrootinanna. I can`t get my head around how I would then get a listing of all the folders in ALL of those subdirectories. I can get the listing of one branch of the tree but how do I get back and find a listing for all the branches. I hope this makes`s nearly 1am here in Norway and I&#039;m tired but this is really bugging me..I am sure I&#039;ll be dreaming asp tonight :) (wouldn`t be the first time)<BR><BR><BR>Dim objFSO<BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>Dim strCurrentFolder<BR>strCurrentFolder = "C:Inetpubwwwrootinanna"<BR>Dim objFolder<BR>Set objFolder = objFSO.GetFolder(strCurrentFolder)<BR>ListSubDirec tories objFolder<BR><BR>Sub ListSubDirectories(objFolder)<BR>Dim objSubFolder<BR>For Each objSubFolder in objFolder.SubFolders<BR>Response.Write objSubFolder<BR>Next<BR>End Sub

  2. #2
    Join Date
    Dec 1969

    Default Check out this article...

    It shows you how to step through each file in a subdirectory and all of its descendent subdirectories...<BR><BR><BR>Happy Programming!

  3. #3
    Inanna Guest

    Default RE: Check out this article...

    Thankyou, thankyou.<BR>Scott to the rescue again :)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts