Results 1 to 2 of 2

Thread: Sex

  1. #1

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

    Smile

    Hey Peeps.

    Could someone advise me on how I can find out whether a file exists on the server thru ASP? Thanks.


    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
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    The following code will check if there is a file called "index.asp" in a certain folder (just change the folder name).


    <%

    Set fileIO = CreateObject("Scripting.FileSystemObject")
    path=Server.Mappath("/the_folder_name")
    Set Dir=fileIO.GetFolder(path)
    Set FileCollect=Dir.Files
    For Each item in FileCollect

    if item.name="index.asp" then response.write "Yes"

    Next
    set fileIO=Nothing
    %>
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

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