cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl with -w option run as batch

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 2 Apr 2013 14:25:13 +0200 (CEST)

On Tue, 2 Apr 2013, Lydia Eichelmann wrote:

> I am trying to use a curl command from cmd with the -w "%{time_total}"
> option. The command works fine run directly from cmd, but when I run it as a
> batch file it does not.
>
> Without the -w option, the command worked fine from cmd directly and as
> batch, as well. So the problem seems to be the -w "%{time_total}". I run it
> on Windows 7, but I don't know, if that's important here.
>
> Can you see the mistake where I can't?

The character '%' needs to be escaped in Windows/DOS batch files. You escape a
% by writing two of them like %%...

See: http://www.robvanderwoude.com/escapechars.php

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
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 2013-04-02