Re: Download files from the web [message #87144 is a reply to message #87141] |
Fri, 10 January 2014 06:48  |
Mats Löfdahl
Messages: 263 Registered: January 2012
|
Senior Member |
|
|
Den fredagen den 10:e januari 2014 kl. 11:41:20 UTC+1 skrev Helder:
> On Friday, January 10, 2014 11:22:16 AM UTC+1, Mats Löfdahl wrote:
>
>> [...] I can execute the last line above after this and get a response code of 404 but at that point the program has stopped. I suppose I could add some error handling code but isn't the IDLnetUrl object supposed to take care of this?
>
> Hi Mats,
>
> this will not really help, but at least you feel my pain :-)
>
> I'm working around this problem with a call to catch and then check the error code (404). You can then either report that the file is missing if the error is 404, otherwise simply give out the error code.
I did this now, as well. Seems to work. Thanks.
> I found that this is the only way if you're using http. With ftp you can of course check the list of available files with the method GetFtpDirList.
>
> But I guess you already know all of this.
No, I'm new to downloads from within IDL. I haven't tried ftp yet.
> If there's a better way... happy to hear about it.
Me too. :o)
|
|
|