I need to check if a file exists on a server using delphi..
The idea is to send a request to the server (ex : http://www.example.com/file.txt) and check the status code of the response..
how is it done in delphi?
I need to check if a file exists on a server using delphi.. The
Share
You can use the TIdHTTP class (included in Delphi). Simply create an instance at run time and use its Head method to retrieve information about the server resource.
Note that it will not download the whole resource, and the value in ContentLength is not guaranteed ok (for example for dynamically created resources)