Checking if a file exists?? HELP!

Results 1 to 3 of 3

Thread: Checking if a file exists?? HELP!

  1. #1
    Join Date
    Dec 1969
    Posts
    18

    Default Checking if a file exists?? HELP!

    I need to know how I could check if a file exists in a certain directory. If the file exists, then it should display it, if it doesn&#039t, then it should display a default page that says whatever. How is this done?

  2. #2
    Join Date
    Dec 1969
    Posts
    168

    Default RE: Checking if a file exists?? HELP!

    &nbsp;<BR>&#060;% Myself=Request.Serveriables("Path_Translated")<BR> &#039 create an instance of the FileSystemObject object<BR>Set MyFileObject=Server.CreateObject("Scripting.FileSy stemObject")<BR><BR>If MyFileObject.FileExists(Myself) then<BR> Response.write("I exisit")<BR>else<BR> Response.Write("I do not exisit")<BR>end if<BR>&#037;&#062;<BR><BR>Hope this helps, cheers!

  3. #3
    Join Date
    Dec 1969
    Posts
    18

    Default RE: Checking if a file exists?? HELP!

    Thank you Desiree. That really helped!

Posting Permissions

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