Look at the script step:
Pause [ ]
Pause is my current solution. Short pause might not enough for event to execute. Users are not confortable for long pause time.
The copy or delete working duration depends on the file size. File size is uncertain. It is better to avoid fix pause time. Is there any way to check the event status? The event, "cmd shell", I use wil be closed automatically when it is done.
There is no way to check the event status. Unless your batch script makes a change that your FileMaker system can detect, you are stuck with the pause.
If you add a Plug in that can read the contents of a directory, you might set up a loop that checks the directory and does not move on until the deleted file disappears.