'************************************** ' Name: ASP Procedure Used To Recurse Th ' rough All SubFolders Of Any Given Path ' Description:Use it to recurse (walk-th ' rough) every sub-directory of any given ' path. Use it to find a file or list all ' files in any given path. ' By: ObjectMethod (from psc cd) ' ' ' Inputs:"PATH" = Starting location of s ' earch ' ' Returns:You can write your own code fo ' r each file or folder found. ' 'Assumes:None ' 'Side Effects:None '************************************** <% Sub Recurse(Path) Dim fso, Root, WindowsFolder, Files, _ Folders, File, i, FoldersArray(100) Set fso = Server.CreateObject("Scripting.FileSystemObject") Set Root = fso.getfolder(Path) Set Files = Root.Files Set Folders = Root.SubFolders For Each File In Files ''''''''''''''''''''''''''''' 'Code For Each File Found 'Goes Here! ''''''''''''''''''''''''''''' Next For Each Folder In Folders ''''''''''''''''''''''''''''' 'Code For Each Folder Found 'Goes Here! ''''''''''''''''''''''''''''' FoldersArray(i) = Folder.Path i = i + 1 Next For i = 0 To UBound(FoldersArray) If FoldersArray(i) <> "" Then Recurse FoldersArray(i) Else Exit For End If Next End Sub %>