Maximum Subdirectories

Bovinicus

Diamond Member
Aug 8, 2001
3,145
0
0
My professor for my computer concepts class just told me that if you make more than 14 subdirectories in Windows, it will lockup and it will be impossible to boot into it without using a Norton Utilities bootdisk to fix it. I am not willing to try it myself, but I find this hard to believe that it will simply lockup and be unbootable. She claims she has had students try it at school and they were forced to go in and fix it. Does anyone know if this is true? Does anyone have a POS copmuter they never use that they might want to try this out on? I am curious to know, but I am not taking the chance on ruining my computer to find out.
 

MrGrim

Golden Member
Oct 20, 1999
1,653
0
0
lol I've gone as deep as 24 :)

Win2k of course, anything below doesn't count as an O/S.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I believe there's a limit of like 255 characters for a pathname that will break things, but I don't think 14 subdirectories is a real limit.

Ask her which OS, if she said DOS or Win9X tell her those don't count as real OSes.

Win2k of course, anything below doesn't count as an O/S.

NT 4 counts as a real OS.
 

Bovinicus

Diamond Member
Aug 8, 2001
3,145
0
0
I believe that she is talking about any Windows OS, because she said that some students did it at school and messed up the computers, and all of the computers at school have Windows2000 Professional installed. I think she is just making up stories so that we don't do it. I don't think she is lying, just misinformed. Have you really gone as deep as 24? For what purpose? Just curious because that seems like an excessive amount of subdirectories. I don't mean a limit of 14 directories inside of a directory, I mean a limit of 14 layers. For example C:\A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S.
 

MSantiago

Senior member
Aug 7, 2002
308
0
86
It's dependent on the type of filesystem. The restrictions are based on the length of the path (which affects the maximum depth, I suppose). Here's the breakdown on maximum path lengths:

FAT12/16: 80 characters
FAT32: 260 characters
NTFS: 32767 characters
 

LS

Member
Jul 31, 2001
68
0
0
This thread made me curious (I was also bored). I made this batch file which will create a folder called folder in the root of your hard drive. I have not been able to delete this folder by any means in DOS, Win9x, or XP. Pretty cool. Don't try this unless you want an undeletable folder ;)

-------begin batch file--------
md\folder1
cd\folder1
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
md\folder
cd\folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
cd folder
md folder
move \folder1 folder
-------end batch file---------
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: Bovinicus
My professor for my computer concepts class just told me that if you make more than 14 subdirectories in Windows, it will lockup and it will be impossible to boot into it without using a Norton Utilities bootdisk to fix it. I am not willing to try it myself, but I find this hard to believe that it will simply lockup and be unbootable. She claims she has had students try it at school and they were forced to go in and fix it. Does anyone know if this is true? Does anyone have a POS copmuter they never use that they might want to try this out on? I am curious to know, but I am not taking the chance on ruining my computer to find out.

First, your professor doesn't know what they are talking about. Now for some actual facts about this:

Using the normal ANSI api's, file paths are limited to 255 characters. Using the extend notation and unicode paths you can extend that to 32k characters. There are no limits on depth of nesting other than the combined path can't be larger than the limits listed.

Now, there are some known bugs in various applications that come into play when the path is EXACTLY the maximum length, some programs don't account for the NULL terminator returned from the API and cause a 1 byte memory overwrite. These programs can fail from this. However, this isn't an OS bug, but an application bug.

Bill
 

Bovinicus

Diamond Member
Aug 8, 2001
3,145
0
0
I had a feeling she didn't know what she was talking about. I have heard her say a few things that I didn't believe at all. I can't really argue with her because she will just bust out her degree and say, "Do you have one of these? Ok, shutup." I knew it. God it makes me mad when I know more than my teacher...
 

Bovinicus

Diamond Member
Aug 8, 2001
3,145
0
0
I just did it myself. I think I'm going to take a screenshot and bring it in and show it to her so she can feel stupid.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: Bovinicus
I had a feeling she didn't know what she was talking about. I have heard her say a few things that I didn't believe at all. I can't really argue with her because she will just bust out her degree and say, "Do you have one of these? Ok, shutup." I knew it. God it makes me mad when I know more than my teacher...

"impossible to boot into it without using a Norton Utilities bootdisk to fix it."

Tell her a guy who worked on NU who saw her posts says she's wrong, she can come argue with me if she likes ;)

Bill