Maximum Path Length (Windows)

There is a pesky maximum path length in Windows that haunts sysadmins. The classic limit of the full path string is 260 characters, but there is a workaround that may solve some of these problems.

If you start your path with: \\?\, then many filesystem api calls will allow paths longer than 32,000 characters. An example path might look like “\\?\C:\Users\Public\file.txt” (but exceeding the classic 260 char limit).

Because many Windows tools do not account for long paths, Microsoft still recommends avoiding any paths longer than 260 chars and staying away from the \\?\ syntax unless it is used to fix a problem with paths that are already exceeding the standard limit.

A more detailed explanation is available on Microsoft’s MSDN site: Naming Files, Paths … (Maximum Path Length Limitation)


About notesbytom

Keeping technology notes on to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s