Delete file in batch

I'm trying to delete a file from within a batch file, and it's not working.


The command works perfectly when run from the Windows command shell. What am I doing wrong?

The del is not a program, it is Windows command line command. You can't run it like this using ShellExecute (that is what "Execute and Wait" uses). You need to actually run command line interpreter this way: or you could run .bat

Also note that you can delete files from AFL using fdelete


Understood. Thank you.