This is a batch script I made for running a Google Search. It supports up to 9 words which are space-delimited. For reference, it went in my %USERPROFILE% directory and is named gs.bat. Any other location which is in your %PATH% is also acceptable, I happen to use that directory because it's quick to get to. Just open the Run dialog box. (
+ R) and type . (thats a period)
The syntax is pretty easy,
gs word1 (word2 word3 word[n])
gs.bat
@echo off
IF [%1]==[] (GOTO Syntax) ELSE (GOTO Run)
:Run
SET QUERY=
IF NOT (%1)==() SET QUERY=%1
IF NOT (%2)==() SET QUERY=%QUERY%+%2
IF NOT (%3)==() SET QUERY=%QUERY%+%3
IF NOT (%4)==() SET QUERY=%QUERY%+%4
IF NOT (%5)==() SET QUERY=%QUERY%+%5
IF NOT (%6)==() SET QUERY=%QUERY%+%6
IF NOT (%7)==() SET QUERY=%QUERY%+%7
IF NOT (%8)==() SET QUERY=%QUERY%+%8
IF NOT (%9)==() SET QUERY=%QUERY%+%9
start http://www.google.com/search?q=%QUERY%
GOTO End
:Syntax
ECHO You must specify at least one word to search for
ECHO gs word1 word2 wordN
pause
:End
SET QUERY=%MYTEMP%
:EOF