Announcement

Collapse
No announcement yet.

tokens delims feed them text

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • tokens delims feed them text

    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 fed in the 1st word per line in the output and essentially google each task running saving me the typing.


    Thanks for reading.

  • #2
    Re: tokens delims feed them text

    Is this of any help,

    Open google in new IE tabs:
    Code:
    @Echo Off
    Set "browser=C:\Program Files\Internet Explorer\iexplore.exe"
    
    for /f "tokens=1 delims=," %%A in (
       'tasklist.exe /NH /FO "CSV"^|find "."') do (
       start "%browser%" http://www.google.com/#q=%%A)
    OR, Open google in new IE windows:
    Code:
    @Echo Off
    Set "browser=C:\Program Files\Internet Explorer\iexplore.exe"
    
    for /f "tokens=1 delims=," %%A in (
       'tasklist.exe /NH /FO "CSV"^|find "."') do (
       "%browser%" http://www.google.com/#q=%%A)
    /Rems

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: tokens delims feed them text

      Many thanks lads. I found below to work. Good to know there are still a few cmd line heads still about.


      for /f "delims=, tokens=1" %%a in ('tasklist /fo csv /nh') do start iexplore "http://www.google.com/search?q=%%~a"

      Comment

      Working...
      X