Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done Multiple PIDs for same process

Aug
1,948
71
Code:
c:\users\jlc\utils>ver

TCC  23.00.30 x64   Windows 7 [Version 6.1.7601]

Presently, when I use the @PID function with firefox.exe, @PID returns the first one it finds, even though there may be multiple firefox.exe's. This is WAD.
Code:
c:\users\jlc\utils>TASKLIST firefox
3348  firefox           Suggestions | Take Command - Mozilla Firefox
4724  firefox
6720  firefox
7084  firefox
6956  firefox
4708  firefox

   Total of 6 processes
Code:
c:\users\jlc\utils>echo %@pid[firefox.exe]
3348

I would like to suggest adding an option to @PID, or a new @ function, that would return a space-delimited list of all PIDs for a filename.

Joe
 
How about this:
Code:
function pids=`%@execstr[do f in /p tasklist %1 (echos.  %%@field[0,%%f])]`
 
Back
Top