G
Guest
Hi Folks,
I have run into a bit of an issue with checking for files.
Some files reside on Server X and some on Server Y.
The page with all the links is on Server X. If the file exists we display a
link, if it does not then we display "sorry not yet available".
For the files on server X it is no problem I use an FSO and don't have a
problem. For files on server Y I am having a big problem.
How do I checck to see if these files exist? I was using the code below but
that actually gets the file and some of the files are 50 MB or more.
Dim objHTTP
Dim sHTML
Dim strURL
strURL = BaseProt & RemoteServer & "...rest of path ...=" & URLplacet7
Dim strchkURL
strchkURL = BaseProt & RemoteServer & "...rest of path ..." &
Session("xortho") & ".tif"
Set objHTTP = Server.CreateObject ("Microsoft.XMLHTTP")
objHTTP.open "GET", strchkURL, False
objHTTP.send
sHTML=objHTTP.statusText
If err Or sHTML<>"OK" Then
Response.Write "Not Yet Available<br />"
Else
Response.Write("<a href='" & BaseProt & RemoteServer & "...rest of path
....?FindFile=" & URLplacet7 & "'>" & Session("xortho") & ".tif</a><br />")
End If
Set objHTTP=Nothing
Does anyone have any suggestions for me?
Thank you,
I have run into a bit of an issue with checking for files.
Some files reside on Server X and some on Server Y.
The page with all the links is on Server X. If the file exists we display a
link, if it does not then we display "sorry not yet available".
For the files on server X it is no problem I use an FSO and don't have a
problem. For files on server Y I am having a big problem.
How do I checck to see if these files exist? I was using the code below but
that actually gets the file and some of the files are 50 MB or more.
Dim objHTTP
Dim sHTML
Dim strURL
strURL = BaseProt & RemoteServer & "...rest of path ...=" & URLplacet7
Dim strchkURL
strchkURL = BaseProt & RemoteServer & "...rest of path ..." &
Session("xortho") & ".tif"
Set objHTTP = Server.CreateObject ("Microsoft.XMLHTTP")
objHTTP.open "GET", strchkURL, False
objHTTP.send
sHTML=objHTTP.statusText
If err Or sHTML<>"OK" Then
Response.Write "Not Yet Available<br />"
Else
Response.Write("<a href='" & BaseProt & RemoteServer & "...rest of path
....?FindFile=" & URLplacet7 & "'>" & Session("xortho") & ".tif</a><br />")
End If
Set objHTTP=Nothing
Does anyone have any suggestions for me?
Thank you,