Command prompt help

JTD777

Honorable
Apr 4, 2012
129
0
10,680
Hey all,

I am trying to write a batch file loop that will check for a process, and if it does not exist, to exit the command prompt. So far I can get it to loop, or exit if not there, but I cannot format the if statement.

Here's my code

@echo off

:a
timeout /t 5

tasklist /fi "imagename eq chrome.exe"
if find /i "no tasks" || goto :b

goto :a

:b
exit

help please?

you all rock

--J.T.