The /k argument is from the definition of the CMD.EXE
/k : Carries out the command specified by the string but remains active
/c : Carries out the command specified by the string and then terminates
If you are going to use the CMD.EXE, please review the Help Text on that command and it will further explain. Otherwise, you should be able to address the ERASE or DEL commands directly without having to call the CMD.EXE.
Another option is to create a BAT file that contains the commands you want to execute and then just call the BAT file from the EXEC Task.