beyond 256 character for directories?

  • Thread starter Thread starter Dale
  • Start date Start date
D

Dale

Is there a way to extend the directory structure beyond
256?

The limit is for the sum of all directories and file name
not to exceed 256 characters? Right?

Thanks!

Dale
 
Call the Unicode version of CreateFile( ..) API [ CreateFileW() ] and
prepend "\\?\" to the path to extend the limit to nearly 32,000 wide
characters.
 
Note even for the long paths (< 32367 wide characters) the size of each
element of the directory/file cannot exceed MAX_PATH (260 wide characters).
In other words, you can have a path upto 32367 wide characters such as
\\??\C:\Dir1\Dir2\Dir3.... but the length of the "Dir1" cannot exceed 260
wide characters.

--
Thanks,
Arif Saifee [MSFT]

PS: Please post DFS related queries in the newsgroup
"microsoft.public.win2000.file_system". Please use "DFS" in the subject to
make it immediately noticeable.

Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.

CheckAbdoul said:
Call the Unicode version of CreateFile( ..) API [ CreateFileW() ] and
prepend "\\?\" to the path to extend the limit to nearly 32,000 wide
characters.

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------

Dale said:
Is there a way to extend the directory structure beyond
256?

The limit is for the sum of all directories and file name
not to exceed 256 characters? Right?

Thanks!

Dale
 
Hi Arif,

Thanks for the correction.

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------

Arif Saifee said:
Note even for the long paths (< 32367 wide characters) the size of each
element of the directory/file cannot exceed MAX_PATH (260 wide characters).
In other words, you can have a path upto 32367 wide characters such as
\\??\C:\Dir1\Dir2\Dir3.... but the length of the "Dir1" cannot exceed 260
wide characters.

--
Thanks,
Arif Saifee [MSFT]

PS: Please post DFS related queries in the newsgroup
"microsoft.public.win2000.file_system". Please use "DFS" in the subject to
make it immediately noticeable.

Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.

"CheckAbdoul" <636865636B6162646F756C406E6F7370616D2E6D7670732E6F7267> wrote
in message news:ejSIM%[email protected]...
Call the Unicode version of CreateFile( ..) API [ CreateFileW() ] and
prepend "\\?\" to the path to extend the limit to nearly 32,000 wide
characters.

--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------

Dale said:
Is there a way to extend the directory structure beyond
256?

The limit is for the sum of all directories and file name
not to exceed 256 characters? Right?

Thanks!

Dale
 
Back
Top