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 \\.\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: 2021/3/3 09:11,
|©2021 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://piclist.com/techref/os/win/winnt/delcrap.htm"> Deleting crap folders and files in Windows NT</A>
|Did you find what you needed?|
PICList 2021 contributors:
o List host: MIT, Site host massmind.org, Top posters @20210303 Harold Hallikainen, Neil, Jason White, Bob Blick, Alan Pearce, RussellMc, Ryan O'Connor, David VanHorn, mailinglist4, Sean Breheny,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to piclist.com!