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 17:12, local time: 2018/3/23 12:19,
|©2018 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://www.piclist.com/techref/os/win/winnt/delcrap.htm"> Deleting crap folders and files in Windows NT</A>
|Did you find what you needed?|
PICList 2018 contributors:
o List host: MIT, Site host massmind.org, Top posters @20180323 RussellMc, Isaac M. Bavaresco, Sean Breheny, Van Horn, David, Neil, alan.b.pearce, Bob Blick, David C Brown, John Gardner, Brent Brown,
* 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 www.piclist.com!