Advertisement
The_illusion

Tasklist

Mar 9th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.63 KB | None | 0 0
  1. @echo off
  2. setlocal
  3. cls
  4. title Task List
  5. CD /d "%~dp0"
  6. :: This will display all task's
  7. :start
  8.     ECHO.
  9.         set choice=
  10.         set /p choice=Do you want to get all Task's? (y/n)
  11.         if not '%choice%'=='' set choice=%choice:~0,1%
  12.         if '%choice%'=='y' goto _run
  13.         if '%choice%'=='n' goto Skip
  14.         ECHO "%choice%" is not valid, try again
  15.         ECHO.
  16.     goto start
  17. :_run
  18. echo.  
  19.     echo Getting Running Task's..........
  20. tasklist/fi "STATUS eq running" > "Task List.txt"
  21.     echo Getting not responding tasks...
  22. tasklist/fi "STATUS eq not responding" >> "Task List.txt"
  23.     start notepad "Task List.txt"
  24.     echo Complete
  25.     goto end
  26.     :Skip
  27.     goto end
  28. :end
  29. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement