Home » Questions » Computers [ Ask a new question ]

How do I extend the maximum file path size in Windows 7? [duplicate]

How do I extend the maximum file path size in Windows 7? [duplicate]

Does anybody know if it is possible to extend the maximum path length in Windows 7 (64-bit)?

Asked by: Guest | Views: 318
Total answers/comments: 2
bert [Entry]

"Unfortunately the answer is ""depends on the program"". It is up to the people who write the programs to determine which method they want to use. In fact, (shameless plug) I wrote a blog entry a few weeks ago describing the problem at Explorer still limited by MAX_PATH.

Depending on what you're trying to do you could use another program to manage the long paths, like Microsoft Word. Otherwise, your only other option is to just ""live with it"" since it's been like that forever and doesn't seem to be changing anytime soon.

Just thought I'd also mention that 64-bit Windows also uses the ""Win32"" API and CreateFileA for both 32-bit and 64-bit programs have the problem.

EDIT: Geeky Details

The problem exists only in the CreateFileA function and the CreateFileW function when an absolute path with a drive letter is used. The only method to get around it (in code) is to use the \\?\C:\Path\To\File.txt syntax... so even programs that use CreateFileW with a path of C:\Path\To\File.txt have the issue. It's kind of hard to describe but needless to say, the largest reason of programs not internally supporting the \\?\ syntax is they loose the ability to use relative paths (paths like ..\Documents\file.doc)."
bert [Entry]

Use a Junction Point to provide a shorter path into a longer path.