Extended-Length Path

 

Extended-length paths are file and directory names that have a combined length greater than 259 characters with a maximum length of approximately 32,766 characters.  When passing an extended path to a supporting function, the path must be an absolute path.  It cannot be a partial nor relative path and path segments must be separated by back slashes (\).  Forward slashes (/) cannot be used.  Either the "\\?\" prefix for local path or the "\\?\UNC\" for UNC paths can be added to the beginning of a path to improve performance.  The  "\\?\" prefix should be placed before the drive letter of a local path.  The "\\?\UNC\" prefix should replace the leading "\\" for UNC (share) paths. Supporting functions that return absolute paths automatically include the appropriate extended-length path prefix when the total length exceeds 259 characters. Note that optical media, like the ISO 9660 CD/DVD format, often have more restrictions on the length of files, folders, and paths than the Windows operating system so these devices may not support extended-length paths.

The following file and directory functions support extended-length paths:

         DirAttrGet

         DirAttrGetEx

         DirAttrSet

         DirAttrSetEx

         DirExist

         DirInfoToArray

         DirMake

         DirRemove

         DirSize

         FileAppend

         FileAttrGet

         FileAttrGetEx

         FileAttrSet

         FileAttrSetEx

         FileCompare

         FileCopy

         FileDelete

         FileExist

         FileGet

         FileGetW

         FileInfoToArray

         FileItemize

         FileItemPath

         FileMapName

         FileMove

         FileNameLong  

         FileNameShort

         FileOpen

         FilePut

         FilePutW

         FileRename

         FileSize

         FileSizeEx

         FileTimeCode

         FileTimeGet

         FileTimeGetEx

         FileTimeSet

         FileTimeSetEx

         FileTimeTouch

         FileVerInfo

         FileYmdHms

        

The following functions support extended-length paths but require the extended-length file paths to be converted to a Unicode string before being passed to the function:

         BinaryRead

         BinaryReadEx

         BinaryWrite

         BinaryWriteEx

Note: Extended-length file paths may be converted to a Unicode string using ChrStringToUnicode.

 

 

 

Notes

 

Reference

 

Step by step guide to learning WIL