Use cmd prompt to search a word on google or other search engine Use cmd prompt to search a word on google or other search engine windows windows

Use cmd prompt to search a word on google or other search engine


Simply type this on the command-line or in the run command and it will open your default browser to let Google search for SEARCHTERM:

start www.google.com/search?q=SEARCHTERM

Note that you have to replace whitespaces with pluses, e.g.

start www.google.com/search?q=Use+cmd+prompt+to+search+a+word+on+google+or+other+search+engine

Alternatively you could also put this command in a batch file:

@start www.google.com/search?q=%1+%2+%3+%4+%5+%6+%7+%8+%9


easy.

@echo offcolor asetlocal ENABLEDELAYEDEXPANSIONecho Google Batchecho Made By GenoSansstart https://discord.gg/WwRtbBetimeout -t 5 /nobreak:aclsecho                                            ,,echo   .g8'''bgd                               `7MMecho .dP'     `M                                 MMecho dM'       `   ,pW'Wq.   ,pW'Wq.   .P'Ybmmm  MM  .gP'Yaecho MM           6W'   `Wb 6W'   `Wb :MI  I8    MM ,M'   Ybecho MM.    `7MMF'8M     M8 8M     M8  WmmmP'    MM 8M''''''echo `Mb.     MM  YA.   ,A9 YA.   ,A9 8M         MM YM.    ,echo   `'bmmmdPY   `Ybmd9'   `Ybmd9'   YMMMMMb .JMML.`Mbmmd'echo                                  6'     dPecho                                   Ybmmmd'echo.set /p s=Search: set word=+set str=%s%set str=%str: =!word!%start http://www.google.com/search?q=%str%goto a


I created a Batch file 'g.bat' and added it to my PATH. It looks like this:

start www.google.co.uk/search?q=%1+%2+%3+%4+%5

Supports up to 5 words (of course you can add more). Now I can search from CMD or start by typing "g query"

Edit: Credit to mrt for the inspiration