I am using the cURL app to download multiple csv files. I want to find a way to check if the file exists on the ftps site before kicking off the download. If it doesn't exist I would like to find a way for cURL to check again at regular intervals. I am trying to stick to using cURL commands for this I am really not good at .Net programming. Any help would be appreciated
Asked
Active
Viewed 7,112 times
1 Answers
8
$ curl ftp://[host]/[path] --ssl --head
(you might also need -k)
--ssl: Try to use SSL/TLS for the connection
--head: When used on an FTP or FILE file, curl displays the file size and last modification time only
It will return an error if the file doesn't exist. It will not keep checking, it will only check once so you need to do the repeated checking using some scheduler/cron/script or whatever.

Daniel Stenberg
- 54,736
- 17
- 146
- 222
-
Is this a curl command that i can put directly into the curl command line? – May 10 '11 at 17:59