curl-users
cURL command Line Sytnax
Date: Thu, 17 Feb 2011 10:54:39 -0500
Hello. Using the cmd window, I have successfully downloaded a file
using the following code:
curl -k -o ContentExposure20110214.xls -L -b cookies.txt
"https://explore.coremetrics.com/rb/downloadreport.do/Content%20Exposure
_2011-02-14.csv?reportId=9990400000000401&reportType=DAILY&dateId=201102
14&clientId=90096841&format=csv"
however I want to save the file in a directory other than the curl
directory, which is the default. I saw the --create-dirs command on
your man page and have scoured your archives but cannot find even a
snippet of code showing the correct syntax for creating directories.
is --create-dirs placed after the -o? what is the syntax of the
directory string .. single quotes, double quotes, no quotes?
Also, it seems to be possible to use variables for dates, however I have
no idea how to implement that- this would be downloading the same file
with a different date string every day i.e
Content%20Exposure_2011-02-14.csv the date portion of the file should
change.
I'm not a seasoned scripter and I use the command line very infrequently
Lisa
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-17