If the files will under a web-server on the remote server (you can download
them directly using URLs) then you can do a HEAD request and see if it
exists (and possibly how large it is).
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
<%@ LANGUAGE="VBSCRIPT"%>
<%
'check to see if url returns a file
'
option explicit
dim xmlhttp
dim targetsite
dim targeturl
Response.ContentType = "text/plain"
Response.Buffer = false
targetsite="http://www.ielearning.com/"
targeturl = targetsite & "i/wbtmanlogo.gif"
'get a component that can do a HEAD request
'for Windows NT this component may be downloaded at
www.microsoft.com/xml
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")
'************************
'See if the target url exist
'************************
xmlhttp.open "HEAD", targeturl, false
'send HEAD request
xmlhttp.send
Response.Write xmlhttp.status & " - " & xmlhttp.statusText & vbCrlf
Response.Write xmlhttp.getAllResponseHeaders
%>
Returns:
200 - OK
Server: Microsoft-IIS/4.0
Connection: keep-alive
Date: Thu, 16 Sep 2004 15:08:44 GMT
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Wed, 15 Sep 2004 20:58:36 GMT
ETag: "8092b0c4669bc41:5cc3"
Content-Length: 2417
"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
Thanks Ken.
Maybe I am mistaken, but they are talking about servers within their
domain. I am trying to see if a file exists on a remote server outside our domain.
Anyone have some ideas???
Ken Schaefer wrote:
This question has been asked at least twice in the last 24 hours in this
group.
See: "copy files on network" posted by Marjus Weber and
\\share\directory\ posted by Ed
Cheers
Ken
"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com... Currently we have a site that allows users to listen to mp3 files. It
is creating bandwidth issues. So we want to move the mp3 files to an
ISP that caps bandwidth usage. Ours is currently burstable.
Now I am able to do the following:
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.fileExists(music_file) Then
'show music file
Else
'do not show a link for file
End If
set fs = nothing
Is it possible to do the same thing, but on a remote server?
Thanks.