Speed up

Results 1 to 2 of 2

Thread: Speed up

  1. #1
    Join Date
    Dec 1969

    Default Speed up

    Here is some code I have to get all .asp, .cfm, .htm and .html files. It works but is real slow. Can anyone speed it up? I am going to use the list for a search on the site. <BR>Thanks <BR><BR>Dim objFSO, objFolder, objFolderContents, objFileItem, objSubfolder, strFileext4, strFileext5 <BR>Set objFSO = Server.CreateObject("Scripting.FileSystemObject") <BR><BR>function getFiles(somepath) <BR>Set objFolder = objFSO.GetFolder(somepath) <BR>for each objFileItem In objFolder.files <BR>strFileext4 = Right(objFileItem.name, 4) <BR>strFileext5 = Right(objFileItem.name, 5) <BR>IF (strFileext4 = ".asp" or strFileext4 = ".htm" or strFileext4 = ".cfm" or strFileext5 = ".html") Then <BR>response.write objFileItem.name <BR>End if <BR>next <BR><BR>for each objsubfolder in objFolder.subfolders <BR>getFiles(objsubfolder.path) <BR>next <BR>end function <BR><BR>getFiles("e:\")

  2. #2
    James W. Guest

    Default CROSSPOST


Posting Permissions

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