ducatitech.com

mh900e folder

<% Dim objFileScripting, objFolder, strDirectoryPath ' Subroutine to recursively list the contents of any subfolders Sub IterateThroughDirectory(objFolder, strUrlPathName) Dim objFileCollection Dim strFilename Dim objSubFolder ' Return file collection in folder Set objFileCollection = objFolder.Files ' Create the links For Each strFilename In objFileCollection strFilename = Right(strFilename, Len(strFilename) - InStrRev(strFilename, "\")) Response.Write "
  • " & strUrlPathName &"" & strFileName & "" & vbCrLf Next ' Now that we've processed root files, do it for all the subdirectories For Each objSubFolder in objFolder.SubFolders IterateThroughDirectory objSubFolder, strUrlPathName & objSubFolder.Name & "/" Next ' Close the file collection Set objFileCollection = Nothing End Sub ' Get file scripting object Set objFileScripting = CreateObject("Scripting.FileSystemObject") ' Dynamically assign the filesystem path ' Allows the script to use different physical dirs where logical URL path remains the same strDirectoryPath = Server.MapPath("/bikes/mh900e/") & "\" ' Return folder object Set objFolder = objFileScripting.GetFolder(strDirectoryPath) ' Call the subroutine IterateThroughDirectory objFolder, "" ' Close all of the open objects Set objFolder = Nothing Set objFileScripting = Nothing %>