http://www.anetforums.com/posts.aspx?ThreadIndex=233 Discusses some tecniques for cleaning up crap folders and files written by ftp users.
@echo off echo WARNING! This will prompt and then remove echo all folders under the current folder: cd echo which have long names or illegal names, echo leaving only those folders with standard echo 8.3 names. pause @for /F "tokens=3,4,5" %%A in ('dir /x/ad') do if "%%A"=="<DIR>" if not "%%B"=="%%C" if not "%%C"=="" rd %%B /S
Certain folders with special names like the names of devices or reserved names(AUX/NUL/LPT1/COM!) can be removed using a trick from the following Microsoft Knowledge base article: http://support.microsoft.com/support/kb/articles/Q120/7/16.ASP.
The article states that you can't remove files with reserved driver names (i.e AUX, CON...etc) since a check of reserved words is performed any time you perform a file/dir operation. Fortunately, another option exist to bypass the normal reserve-word checks altogether. You may access your directories via Universal Naming Convention (UNC).
Tou can possibly delete any file with a command such as:
DEL \\.\driveletter:\path\filename
For example:
DEL \\.\C:\inetpub\ftproot\com1 /S/Q
RD \\.\C:\inetpub\ftproot\com1 /S/Q
+
file: /Techref/os/win/winnt/delcrap.htm, 1KB, , updated: 2008/4/29 16:12, local time: 2024/11/22 04:45,
18.117.94.77:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/os/win/winnt/delcrap.htm"> Deleting crap folders and files in Windows NT</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.