Results 1 to 3 of 3

Thread: VBScript... FileSystemObject

  1. #1

    Thread Starter
    Hyperactive Member chuddy's Avatar
    Join Date
    Oct 2002
    Posts
    333

    VBScript... FileSystemObject

    Is it possible to use the FileSystemObject in VBScript on a webpage?

    I tried to do...

    Set FSO = new Scripting.FileSystemObject

    and

    Set FSO = CreateObject("Scripting.FileSystemObject")

    and neither would work...

    Does Internet Explorer also need to have specific security settings for this to work?? Or does there need to be something before this code?

    Thanks in advance!

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    If you are talking about client-side then no you can't use it.

  3. #3
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    you can use the FileScriptingObject but only on the server site..

    VB Code:
    1. Set fs = Server.CreateObject("Scripting.FileSystemObject")
    2. path = "C:\myFolder\myFile.txt"
    3.  
    4. If(fs.FileExists(path)) then
    5.    'open and read the file
    6. Else
    7.    'File doesn't exist
    8. End If
    9.  
    10. Set fs = nothing
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

Posting Permissions

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



Click Here to Expand Forum to Full Width