FOR /F "usebackq tokens=2" %i IN (`tasklist ^| findstr /r /b "[0-9][0-9]*[.]exe"`) DO taskkill /pid %i
A few changes:
- The command_to_process command requires quotation marks (``) on both sides of the command.
- Pipes ("|") inside command_to_process must be escaped with a caret ("^").
- findstr , ".exe". , "myapp4.exe" . , , , .
- "skip = 2" , findstr, . - , , .
, script, "%% i" "% i" , , i was unexpected at this time.