Hello,

Can anyone tell me if its possible to check to see if a remote (text) file
exists, I'm currently using

If (fs.FileExists("http://www.example.com/myfile.txt"))=true Then

but this doesn't work

Any ideas?

Thanks in adance

Gram.

Re: File Exists by Paul

Paul
Fri Aug 29 10:13:45 CDT 2003

You are passing a URL, you should pass a file name.

If you don't have a file name, the only way to determine whether it exists
is to make a HTTP request and see if the status code is 404.

Paul

"Gram" <gram3000@hotmail.com> wrote in message
news:DUJ3b.29590$pK2.46957@news.indigo.ie...
> Hello,
>
> Can anyone tell me if its possible to check to see if a remote (text) file
> exists, I'm currently using
>
> If (fs.FileExists("http://www.example.com/myfile.txt"))=true Then
>
> but this doesn't work
>
> Any ideas?
>
> Thanks in adance
>
> Gram.
>
>



File Exists by John

John
Fri Aug 29 10:13:34 CDT 2003

I assume that fs is a properly created and instantiated
FSO object. In any case, I don't believe FSO recognizes
HTTP. You would need to access using
the "\\server\filename" syntax and that requires
permissions on the remote server.

There may be a way to do it using one of the TCP/IP
Protocols. I don't know.

HTH,
John




>-----Original Message-----
>Hello,
>
>Can anyone tell me if its possible to check to see if a
remote (text) file
>exists, I'm currently using
>
>If (fs.FileExists("http://www.example.com/myfile.txt"))
=true Then
>
>but this doesn't work
>
>Any ideas?
>
>Thanks in adance
>
>Gram.
>
>
>.
>

Re: File Exists by Aaron

Aaron
Fri Aug 29 10:16:00 CDT 2003

> Can anyone tell me if its possible to check to see if a remote (text) file
> exists, I'm currently using
>
> If (fs.FileExists("http://www.example.com/myfile.txt"))=true Then
>
> but this doesn't work

Trap for an error using MSXML...
http://www.aspfaq.com/2173



Re: File Exists by Gram

Gram
Fri Aug 29 10:46:33 CDT 2003

Thanks for your help guys, I sorted it out using XMLHTTP

"Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
news:#eCLDCkbDHA.1744@TK2MSFTNGP12.phx.gbl...
> > Can anyone tell me if its possible to check to see if a remote (text)
file
> > exists, I'm currently using
> >
> > If (fs.FileExists("http://www.example.com/myfile.txt"))=true Then
> >
> > but this doesn't work
>
> Trap for an error using MSXML...
> http://www.aspfaq.com/2173
>
>