Reputation: 11
I cant get this to work hope u get idea. I am trying to kill tasks by taking task list from my file...
echo off
set Taskkill_DB "C:\Users\jokbo\Desktop\CMD NEXT\Taskkill_DB.txt"
for /f tokens=* %%A in (%Taskkill_DB%) do (taskkill /F /T %%A >nul 2>&1)
pause
Upvotes: 0
Views: 41
Reputation: 14290
I can only fix your code based on your existing code example. Without seeing the actual data, I can only guess what it is in your text file.
echo off
set "Taskkill_DB=C:\Users\jokbo\Desktop\CMD NEXT\Taskkill_DB.txt"
for /f "usebackq tokens=*" %%A in ("%Taskkill_DB%") do (taskkill /F /T %%A>nul 2>&1)
pause
Upvotes: 1