Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2006
    Posts
    5

    Unanswered: FileSystemObject Invalid

    Hi,

    Can anyone help me on this matter.

    I just wanted to list out all the files in a folder but somehow got this error which i cant shake off.
    My code is as below:

    Dim oFS,oFOLDER,oFILE

    Set oFS=Server.CreateObject("Scripting.FileSystemObjec t")
    Set oFOLDER=oFS.GetFolder("c:/FM")
    For Each oFILE In oFOLDER.Files
    Response.Write(oFILE.Name&"<br>")
    Next
    Set oFILE=Nothing
    Set oFOLDER=Nothing
    Set oFS=Nothing

    The error would always point to
    Set oFS=Server.CreateObject("Scripting.FileSystemObjec t")
    saying its an "Invalid class Object"

    Does anyone has any clue on this?
    Thanx

  2. #2
    Join Date
    Mar 2006
    Location
    south jersey, usa
    Posts
    53
    why is there a space between the c and the t?

    also on the next line the forward slash should prolly be a backslash
    "They say Moses split the Red Sea
    I split the blunt and rolled the fat one, I'm deadly"
    -- Tupac 'Blasphemy'

Posting Permissions

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