Networking Forums

Networking Forums > Computer Networking > Windows Networking > Limiting the lengths or depths of paths

Reply
Thread Tools Display Modes

Limiting the lengths or depths of paths

 
 
NZSchoolTech
Guest
Posts: n/a

 
      01-12-2008, 12:46 AM
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.


 
Reply With Quote
 
 
 
 
Ace Fekay [MVP]
Guest
Posts: n/a

 
      01-12-2008, 02:03 AM
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


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
UNC paths by IP good, by name bad David Rush Windows Networking 4 12-19-2006 03:16 PM
Maximum network cable lengths. Doing my head in... Bonge Boo! Home Networking 6 05-05-2005 09:33 AM
non unc paths DS Windows Networking 1 10-15-2004 03:50 PM
Advice req re cable lengths brian j Broadband 5 04-19-2004 04:13 PM
Checking line lengths Nicholas F Hodder Broadband 3 01-05-2004 08:02 AM



1 2 3 4 5 6 7 8 9 10 11