No need to use the DOS rmdir
these days. You can get the same thing using internal commands, removing the need to use MS-DOS Batch mode and @runmode hide
.
@set ChildPath={sourcepath$|noterm}
Copy MOVE * TO ..
Go ..
@keydown:none
Delete {$ChildPath} FAILNOTEMPTY NORECYCLE
You may find that works better.