In news:%(E-Mail Removed),
NZSchoolTech <(E-Mail Removed)> typed:
> Everyone in a school must have seen this one. Some kid gets bored one
> day and so they create a folder in their home directory called 1. In
> that folder they create a new folder called 2. Then in that they
> create a new folder called 3, and they keep on going. The most nested
> levels of folders I've seen so far is 79. Even if it doesn't go that
> deep, they could still create a ridiculous number of levels with
> nothing in them except another folder with silly longer names.
>
> Either way, you get a path length limitation when you want to delete
> the files or do some other kind of maintenance on your system.
>
> Why hasn't Microsoft either
> - given us a way to limit the maximum path length that can be created
> in a share to 260 or whatever it is that most system applications
> like Explorer can handle, or
> - produced versions of key operating system applications that can
> handle very long paths.
>
> Given that this is a well known problem and has been around for a
> long time.
It depends. Many operating system limits are based on the i386 addressable
32bit architecture, such as the number of useres that can access a share,
which is 4.3 billion objects. It also depends on the drive and if an app can
read it. Many programs also expect a limit of 256 objects (characters,
paths, etc), maybe even the deltree command is limited, however NTFS
formatted drives can go beyond the 256 objects.
Is the drive NTFS?
Not able to delete them can also be caused by special characters, trailing
spaces or reserved names in the folders, such as com, lpt, etc, such as when
a machine gets 'pubbed' into an FTP site where the 'pubbers' will create
these deep paths and using reserved names to prevent the admin from deleting
them. If the students were messing around and created subfolders with these
characters, it will give you headaches to remove them. With an FTP app it's
easy to do this, because they use ASCII characters, such as what POSIX uses,
however WIndows uses ANSI and cannot translate the folders. In the past we
had to install the POSIX support on an NT4 machine to clean up such folders
and files.
Try this:
Assuming the first folder is the numeral "1" on D drive (and use the quotes
if you have problems and watch the required periods if the command uses it):
rm -r "//D/1"
or
RD \\.\c=D:\1
or
RmDir \\.\D:\1 /s /q
References:
RmDir \\.\C:\YourFTP_ROOT's_PATH\COM1 /s /q
How to Remove Files with Reserved Names in Windows:
http://support.microsoft.com/default...;EN-US;Q120716
You cannot delete a file or a folder on an NTFS file system volume:
http://support.microsoft.com/kb/320081
Cannot Delete Files or Folders with Extended Characters:
http://support.microsoft.com/kb/131702
--
Regards,
Ace
This posting is provided "AS-IS" with no warranties or guarantees and
confers no rights.
Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT,
MVP Microsoft MVP - Directory Services
Microsoft Certified Trainer
Infinite Diversities in Infinite Combinations
Cannot Delete Files or Folders with Extended Characters:
http://support.microsoft.com/kb/131702