I've been trying to terminate a video converter application process after it run conversions for five seconds (or you could say after a given time). This is the code I've been tying to use,
@echo off
TASKLIST
TIMEOUT /T 5 /NOBREAK
TASKKILL /IM /F /T FileRx.exe
But it doesn't kill the process. Can someone shed some light on what I'm missing here?
You need to be careful about the order of the
taskkillswitches. Try the following:The process name should be right after /IM. See
taskkill /?for the examples.