Path Field Limits
These constants define the maximum length for the path and for the individual fields within the path.
||Maximum length of directory component|
||Maximum length of drive component|
||Maximum length of extension component|
||Maximum length of filename component|
||Maximum length of full path|
The C Runtime supports path lengths up to 32768 characters in length, but it is up to the operating system, specifically the file system, to support these longer paths. The sum of the fields should not exceed
_MAX_PATH for full backwards compatibility with FAT32 file systems. The Windows NTFS file system supports paths up to 32768 characters in length, but only when using the Unicode APIs. When using long path names, prefix the path with the characters \\?\ and use the Unicode versions of the C Runtime functions.