title: Using %* as string parameter on windows .bat files
body: <p>I've been trying to create a simple .bat file to run google search via terminal, but i've found a problem with my parameters(?), i've been searching for some answers and found many possible ways to accomplish what i was trying to achieve, yet none of them worked so either something is wrong within my code or im just dumb enough to program in this thing D:</p>
  
  <p>anyway.. here goes my .bat versions and the problems i've faced within my tries</p>
  
  <p><strong>V-1.0</strong></p>
  
  <p>First try was like this :</p>
  
  <p>Problem :: Can't use the command without "somethingToSearch" 
  and the search includes "somethingToSearch"</p>
  
  <p>Example :: google "minna esper da yo" </p>
  
  <p>would result in googling "mina esper da yo" with the "" 
  which limits the content of the search to some point. .. and its hella boring to type those on my keyboard</p>
  
  <p><strong>google.bat 1.0</strong></p>
  
  <pre><code>@echo off
  start http:\\google.com\search?q=%1
  </code></pre>
  
  <p><strong>V-2.0</strong></p>
  
  <p>Tried to change "%1" to "%*" to get all %parameters% and set a stringVar = %parameters% ... could not find a way to do that....
  i've tried</p>
  
  <blockquote>
    <p>for /F %%a in (%input%) do set search=%%a</p>
  </blockquote>
  
  <p>which gives ::  ECHO search = %1 (always)</p>
  
  <p><strong>V-3.0</strong></p>
  
  <p>seeing my inability to parse "%*" i've decided to remove the "" from the %1 parameter and set it into search ... couldn't find anything useful besides %~1 which expands the string (.. this is half-way? i believe) but i couldn't set a variable equal += expansions ? *im dumb i know</p>
  
  <p><strong>TL;DR</strong></p>
  
  <p>So my question : is is there a way to transform all parameters (%*)  into one single string without the quotation mark? </p>
  
  <p>which would imply::</p>
  
  <p>is there a way to get this to work?</p>
  
  <blockquote>
    <p>google minna esper da yo</p>
  </blockquote>
  
  <p>input = minna esper da yo</p>
  
  <p>%1 = minna</p>
  
  <p>%2 = esper</p>
  
  <p>etc</p>
  
  <p>so the .bat would do ::  search?q=%1+%2+%3....%n</p>
  
  <p>note :: i have no idea how many parameters i'd search? i think i could make a boundary and create a for loop to iterate and check if %1-9 exist? and add into search, but i'll do that only if i don't really find any solution....</p>
  
  <p>thanks for reading and sorry for troubling you guys &lt;3</p>