没有被程序占用的空文件夹不能删除,解决如下。

写一个批处理,例如 delete.bat,内容是:

del /f /a /q \\?\%1
rd /s /q \\?\%1

把需要删除的文件或者文件夹拖放到这个批处理文件上。