How to force windows to respect the rmdir command in my button?

I recently switched the Function: type from MS-DOS to Standard Function (Opus or external). That may have fixed it!

edit: it did not fix. The Delete command still occasionally bails out FAILNOTEMPTY because it seems to be running before the copy MOVE above it is complete...

Not huge priority though. Don't even know if it is possible to fix...