Results 1 to 2 of 2

Thread: Server.CreateObject("MSWC.Tools") - HELP!

  1. #1

    Thread Starter
    Addicted Member Xenonic_Rob's Avatar
    Join Date
    Jun 2000
    Location
    England, UK
    Posts
    213

    Exclamation Server.CreateObject("MSWC.Tools") - HELP!

    Hey guys, Xenonic Rob here.
    I want a way to check whether a file exists on a server.
    I know this command

    Set Tools=Server.CreateObject("MSWC.Tools")

    And then you can do something like

    If Tools.FileExists("<thefile>") = true then blah,blah

    But that doesn't work with IIS and PWS. Any ideas?
    Thanks a lot.

    Rob Wright
    E-mail: [email protected]
    Website: http://www.xenonic.com
    The First Member of Honeybee's Club
    Favourite words: Zugzwang and Empiric

  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    142
    why don't you use the FileSystemObject?

    Code:
    Set filesys = CreateObject("Scripting.FileSystemObject")
    
    if filesys.FileExists("c:\temp\log.txt") then
      Response.Write "yup it exists"
    else
      Response.Write "does not exist"
    end if
    this will most definitely work on IIS.

    dvst8
    Secret to long life:
    Keep breathing as long as possible.

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