Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ExistsURLQ

  • To: mathgroup at
  • Subject: [mg111646] Re: ExistsURLQ
  • From: Simon <simonjtyler at>
  • Date: Mon, 9 Aug 2010 05:11:51 -0400 (EDT)
  • References: <i3m3vp$hkt$>


maybe something like the following?


In[2]:= ExistURLQ["";]
Out[2]= True

In[3]:= ExistURLQ["";]
Out[3]= False

In[4]:= Import["","Elements";]


On Aug 8, 9:21 pm, E. P=E9rez Herrero <enriqueperezherr... at>
> Hello everybody:
> I'm trying to find the best way to test if any internet link is
> available or not, something similar to FileExistsQ, but with a web
> URL.
> As I could not find anything about this topic on the documentation, I
> 've been rewieving some internal packages and the idea I had is this
> one:
> << Utilities`URLTools`
> (*This is a failed link *)
> Quiet[If[(ToString[Head[Utilities`URLTools`FetchURL["";, "file.tmp"]]] ==
>     "Symbol"), Print["Failed"], Print["Ok"]]];
> (*And this is a good one*)
> Quiet[If[(ToString[
>      Head[Utilities`URLTools`FetchURL["";,
> "file.tmp"]]] == "Symbol"), Print["Failed"], Print["Ok"]]]
> The idea is to use the FecthURL function that cames within the
> "URLTools" package, but this way of doing this seems awful and this
> function creates a temporary file that after all it is necessary to be
> deleted.
> Does anybody knows the proper way to do this?
> Thanks in advance.
> Enrique.

  • Prev by Date: Re: Suggestions
  • Next by Date: Re: A new graphic user interface
  • Previous by thread: Re: ExistsURLQ
  • Next by thread: Re: ExistsURLQ