cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Command works from CMD but not from .bat

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 1 Nov 2007 10:09:44 -0700

On Thu, Nov 01, 2007 at 09:48:31AM -0700, Justin Works wrote:
> I'm getting a very strange result. If I go to start --> run --> CMD
> and then at the command prompt enter my curl command as this:
>
> curl "http://hprc.ncqa.org/Result.asp" -e
> "http://hprc.ncqa.org/search.asp" -d
> "txtAreaCode=&lstStates=CA&txtZipCode=&txtPlanName=&rdoProductLine=All&rdoReportingProduct=HMO%2FPOS&SUBMIT1.x=34&SUBMIT1.y=11"
> -o "c:\test2.txt"
>
> I get out 86KB of data with full results.
>
> If I put the exact same command in a .bat file and call it test.bat
> and run this from windows explorer I get out a file, but it is now 6KB
> and doesn't contain anything but one javascript function code from the
> web page.
>
> Any ideas?

The % character is special in a batch file--you need to double them to
pass it to curl.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-11-01