A problem with deleting two folders in a row
I need to delete two folders and all of their contents by calling rmdir /REBOOTOK /r,

rmdir /REBOOTOK /r folderA
rmdir /REBOOTOK /r folderB

The problem is that sometimes it failed to delete folderB. I need to call Sleep between them then it is fine to delete both of them,

rmdir /REBOOTOK /r folderA
Sleep 1000
rmdir /REBOOTOK /r folderB

I wonder if it is just a coincidence. Or calling Sleep in this situation makes a lot of sense? Thanks.