Ticket #207 ( Closed )

Short Description Way to test if file exists on test server?
Entered By: Michael - Charleston When: 1998-11-05 15:27:15 Build: 1.03.07A
Categories Type: Question   Department: Product   Category: SurferScript
Description
With the LiveWire JavaScript extention "exists()" and with any basic cgi one is able to test, at the very least, to see if a file exists on the server. We have a situation where users can run reports on the mainframe which will be FTP'ed to the server. However the process can take say 2-200 seconds so rather than have the user get a 404 error if the file hasn't been created yet, we'd like to perform a test to see if it exists - if so, forward them on, if not, give them a page of instructions. How can this be accomplished with Screensurfer?
Append By: WindSurfer  When: 1998-11-05 15:53:59  New Status: Pending Customer
Comment Get ftp://ftp.ieinc2.com/pub/surfer/t1_3_27f.zip which has the new function FileExists("filename").

This can be used like:

<TEIF FileExists(TestFileName)>
  <TEPUTSECTION DownLoadPage>
<TEELSE
  <TEPUTSECTION WaitaBitInstructions>
</TEIF>

PLEASE NOTE-- literals in Screensurfer if passed in an expression need "doubled-up" backslashes, as with C or JavaScript, since text expressions in SurferScript support \n as a newline, and a few others. So if you use a literal for the path, remember to use d:\\screensurfer\\hostserver\\docs \\ as the start of the name (or whatever).