cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Command works from CMD but not from .bat

From: Justin Works <jworks_at_gmail.com>
Date: Thu, 1 Nov 2007 10:35:48 -0700

On 11/1/07, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> 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
>
That did the trick. Thank you!
Received on 2007-11-01