Save these steps in batch (anyname.bat) file and run it OR run these steps individually.
mkdir D:\empty_dir
robocopy D:\empty_dir D:\dir_to_be_deleted /s /mir
rmdir D:\empty_dir
rmdir D:\dir_to_be_deleted
mkdir D:\empty_dir
robocopy D:\empty_dir D:\dir_to_be_deleted /s /mir
rmdir D:\empty_dir
rmdir D:\dir_to_be_deleted