Results 1 to 2 of 2

Thread: help..

  1. #1
    Join Date
    Dec 1969

    Default help..

    i try to list the files of a folder..but when i do it with the following code it doesnt seem to acts like it enters an infinite loop and never ends....what am i doing wrong? it is something with the folder i am specifying but i dont get what..pleasse help,,<BR><BR>&#039;Create the FileSystemObject object<BR> Dim objFSO<BR> Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR> Response.Write "Passed step 1"& "<BR>"<BR> &#039;Obtain an folder object instance for a particular directory<BR> Dim objFolder<BR> Set objFolder = objFSO.GetFolder("c:/web sites/HypNewWebSite/ArticleImages")<BR> Response.Write "Passed step 2" & "<BR>"<BR><BR> &#039;Use a For Each ... Next loop to display the files<BR> Response.Write "Passed step 3" & "<BR>"<BR> &#039;Print out the name<BR> Dim objFile <BR> &#039;For Each objFile in objFolder.Files<BR> &#039;Response.Write objFile.Name & "<BR>"<BR> &#039;Next<BR>&#039;Set objFolder = Nothing<BR>&#039;Set objFile = Nothing<BR>&#039;Set objFSO = Nothing

  2. #2
    Join Date
    Dec 1969

    Default RE: help..

Posting Permissions

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