Q:

How to keep cmd open after task schedule

I am trying to create a really simple task that uses sdelete command as a scheduled task but when I run the task the CMD just flickers on and off and does not perform the task, so I want to see what it is doing on the CMD to troubleshoot the problem by keeping it on after it has completed.
program/script:
C:\Windows\System32\cmd.exe

Argument:
/c "sdelete -z"

Start in:
C:\Users

A:

Create a new text file and put this in it:
sdelete -z
pause

Save this file as test.bat, making sure to select "All Files" in the filetype dropdown, to avoid the file being named test.bat.txt.
Now run the batch file.The pause command will pause script execution and allow you to see any output in the command window.

