I am trying to check whether a file is available at a particular location or not, if file doesn't exists then it must send an email to an email list. The problem is that, the file needs to be downloaded from a URL (sharepoint) before checking if it exists or not.
If there is no file at the URL, the cURL command is downloading the file with "404 NOT FOUND" content in it. If there is no file at the source, I don't want the cURL command to download any file. How can i achieve this?
cd $file_path curl -k --ntlm -u $USER_GROUP:$PASS -O http://sharepoint.com/sites/dummy/file_list.txt
This is the command to download that i am using. Any help would be appreciated. Thanks.