Tech blog to share information.

July 3, 2010

Command Prompt Search Engine

July 03, 2010 Posted by tj cool No comments
Copy below code and paste in notepad and save as google.bat

@echo off
if not "%1"=="" (set QUERY=%1) else (goto error)
:loop
shift
if not "%1"=="" (set QUERY=%QUERY%+%1) else (goto exitloop)
goto loop
:exitloop
start http://www.google.com/search?q=%QUERY%
exit
:error
echo You did not enter a search query!

This creates a Google command that starts your default web browser and uses the Google search engine to process your search query.

Examples:

google night photography help

google 2006 college basketball statistics

To search MSN's Live.com instead, replace the "start" command with:

start http://search.live.com/results.aspx?q=%QUERY%

To search Yahoo!:

start http://search.yahoo.com/search?p=%QUERY%

To search Ask:

start http://www.ask.com/web?q=%QUERY%

0 comments: