上面的经测试,貌似不能删除带空格的文件夹下的畸形文件夹
例:C:\Documents and Settings\下的1..\
下面是修改过的,附带加上了搜索Con, Prn, Aux, Nul, Lpt1, Com1, Com2类文件夹 | set alldrive=a b c d e f g h i j k l m n o p q r s t u v w x y z | | for %%i in (%alldrive%) do if exist %%i:\ dir /ad /s /b %%i:\|( findstr /e /i "\. \con \Prn \Aux \Nul \Lpt1 \Com1 \Com2") >>1.txt | | for /f "delims=" %%i in (1.txt) do (rd /s /q \\?\"%%i") | | del 1.txtCOPY |
|