in reply to Re^3: Path and File Name Maximum Lengths
in thread Path and File Name Maximum Lengths

Where you perchance operating within a subdirectory when trying this? A subdirectory with a path that itself contains 248-219 = 19 characters?

This is a similar (but simpler) experiment conducted in the root of a drive:

>perl -E"say($_), mkdir '1'x$_ or die $^E for 240 .. 255" 240 241 242 243 244 245 The filename or extension is too long at -e line 1. >dir 1* Volume in drive C has no label. Volume Serial Number is 8C78-4B42 Directory of c:\ 14/06/2010 16:32 <DIR> 1111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +11111111111111111111111111111111111111111111111111111111111111111111 14/06/2010 16:32 <DIR> 1111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 14/06/2010 16:32 <DIR> 1111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +1 14/06/2010 16:32 <DIR> 1111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +11 14/06/2010 16:32 <DIR> 1111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111111111111111111111111111111111111111111111111111111111111111111111 +111 0 File(s) 0 bytes 5 Dir(s) 363,706,941,440 bytes free

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^5: Path and File Name Maximum Lengths
by merrymonk (Hermit) on Jun 14, 2010 at 18:54 UTC
    No. The figures I was writing out was the full path starting at C.
    Also some other tests show that the full path length has to be less than 234.
      Also some other tests show that the full path length has to be less than 234.

      Then those tests are flawed. They are confusing limitations of OS with those of applications.

      As I demonstrated, you can create paths up to and including 244 chars. This is less than 256 because of a historic requirement to reserve capacity to create 8.3 filenames in directories with a total path lengths of 244 characters.

      MAX_PATH is defined as 260 in order to accommodate the 4 char UNC escape '\\?\'.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.