for /f "tokens=1 delims=" %%A in ("c:\windows\system32\tasklist.exe") do "C:\Program Files\Internet Explorer\iexplore.exe" %%A ¶
Hi all
above is where Im at so far. I want to use the tasklist command to list all processes running and then the above line to feed in the 1st word per line in the output (the name of the task) and essentially google each task running saving me the typing. maybe there is an easier way? In any case its a chance for me to learn this pesky for comand.
Thanks for reading.
use ie to google all running tasks (for tokens delims)
Moderator: DosItHelp
-
- Expert
- Posts: 442
- Joined: 01 Aug 2010 17:13
- Location: Canadian Pacific
- Contact:
Re: use ie to google all running tasks (for tokens delims)
Code: Select all
for /f "delims=, tokens=1" %%a in ('tasklist /fo csv /nh') do start iexplore "http://www.google.com/search?q=%%~a"
My version of IE is 7 because I don't use it. Maybe newer versions support multiple websites via arguments like Firefox does. In that case, I would use this:
Code: Select all
@echo off&setlocal enabledelayedexpansion
for /f "delims=, tokens=1" %%a in ('tasklist /fo csv /nh') do set args=!args! "google.com/search?q=%%~a"
start iexplore !args!
Re: use ie to google all running tasks (for tokens delims)
Be careful! If you run approx. 100 instances of Internet Explorer your machine will probably freeze because of 100% CPU use.
Regards
aGerman
Regards
aGerman
Re: use ie to google all running tasks (for tokens delims)
That works great mate. Now to begin learning the code. Yeah it does tie the processor up momentarily but still quicker than googling each individually
Thanks guys and Merry Chrstmas
Thanks guys and Merry Chrstmas