|Subject:||Re: Using TidHTTP to determine if file exists?|
|Posted by:||Remy Lebeau (TeamB) (firstname.lastname@example.org)|
|Date:||Wed, 19 Oct 2005|
"Jesse" <email@example.com> wrote in message
> I want to use TidHTTP to download a file from our web site.
> However, I want to make sure the file exists first.
You can use TIdHTTP.Head() for that. Head() returns just the headers for
> I'm using an asp page to create an export file, so initially, the
> file may not exist until it's created, and I don't want to initiate
> the download until it's there.
Are you accessing the ASP page when downloading the file, or are you calling
the ASP page and then downloading the file directly in a separate request?
If the ASP page is sending the file at the same time that it is created,
then there is no need to check if the file exists beforehand.
Alternatively, since you are writing your own ASP code anyway, you could
just make a separate ASP page that reports whether the file exists or not.
Using TidHTTP to determine if file exists? posted by Jesse on Wed, 19 Oct 2005