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

That command would be synchronous already. The Delete command won't run until the previous command is finished.