Reputation: 191
For example, I want to count the amount of processes with the name "chrome.exe". How can I do that using batch file and show it using ECHO?
Upvotes: 1
Views: 4399
Reputation: 1
I am getting the output like
No Process exists for my id number of chromes: 0 Press any key to continue
But if i check the task manager, there are lot of chrome.exe processes running.
Upvotes: 0
Reputation: 57272
@echo off
for /f "tokens=1 delims=" %%# in ('qprocess^|find /i /c /n "chrome"') do (
set number=%%#
)
echo number of chromes: %number%
pause
Upvotes: 4