Using cURL iterations and batches
I have a folder of files that I need to send to a webservice using cURL, but I'm not sure if all the variables and iterations are in batch files.
I know the syntax for curl should be
c:\curl\bin\curl -X POST -F File=@[filename] -F "title=[title]" -F "notes=[notes]" "http://xxx/AddScannedImage?debtref=[filename]"
but the% characters from the variables seem to end up in the url encoding
Any ideas?
TIA
source to share
You should try with the -g
aka --globoff
cURL option .
Default behavior:
You can specify multiple URLs or portions of URLs by writing sets of parts in curly braces, as in:
http://site.{one,two,three}.com
or you can get alphanumeric series sequences using [], as in:
ftp://ftp.numericals.com/file[1-100].txt ftp://ftp.numericals.com/file[001-100].txt (with leading zeros) ftp://ftp.letters.com/file[a-z].txt
Support for nested sequences is not currently supported, but you can use multiple ones next to each other:
http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
You can specify any number of URLs on the command line. They will be selected sequentially in the order shown.
With curl 7.15.1, you can also specify a step counter for ranges, so that you can get every Nth number or letter:
http://www.numericals.com/file[1-100:10].txt http://www.letters.com/file[a-z:2].txt
You can even do:
curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
But in your case, you really don't want that, so you should use a flag -g
so it doesn't make globes at all.
source to share