I want to implement such a function: Use tasklist to list the current process list, then use find to search whether the process contains 1.exe, 2.exe, 3.exe... (hypothetically). If the list contains one of them, perform a certain operation. I want to use FOR to implement the loop but it doesn't work no matter how I try! This is how I tried:
tasklist | for %%j in (1.exe,2.exe,3.exe) do find "%%j" && goto :p
Is find not usable with for? Please help from the experts.
[ Last edited by namejm on 2007-2-20 at 02:56 PM ]
tasklist | for %%j in (1.exe,2.exe,3.exe) do find "%%j" && goto :p
Is find not usable with for? Please help from the experts.
[ Last edited by namejm on 2007-2-20 at 02:56 PM ]


