Windows: File path character limit

January 29, 2013

Based on a tip I recently wrote for my work colleagues.

I’ve substituted any identifying information with strings of x’s for the number of characters in the real examples from this workplace.


Long file paths are often the reason for getting an error message when you try to add a new file to a folder for which you have access permission.

Bottom line:

  • The total file path length in Windows cannot exceed 260 characters; it may be somewhere between 248 and 260 (see links below). This is a Windows limit and cannot be changed by you or anyone else.
  • The file path length includes the drive name (network or local), the folder name(s), PLUS the file name.
  • ‘Characters’ include spaces, punctuation marks, and underscores as well as letters and numbers.
  • Quick fact: You can’t use any of these characters in a file or folder name: \ / ? : * ” > < | Again, this is a Windows limitation.

Let’s take a look at an example of a long file path:

\\xxxxxxxxxxxxxxx.xxxxx.xxxxxxxxxxxxx.xxx\share\xxxxxx xxxx\xxx\Regulatory Approvals\xxxxxxxxxxx xxxxxxxxxxxx\xxxxx xxxxxxxxxxxx\xx.xxx. xx xxxxx xxxxxxxx xxx\Rev 2 – Amendment 2\RO Brine Discharge EMMP_Rev 2, Amendment 2 (includes Amend 1 text) (draft).docx

There are 260 characters (including the \ separator) in this path, of which some 181 characters are used for the folder path (i.e. without the file name). Remember, every space is a character, every dot, letter, number, parentheses, underscore, is a character. I don’t think the \ separators are counted, but I’m not 100% sure. Without the \ separators, this path is still 251 characters long, so there’s not a lot of room for increasing the file name, changing the folder names, or adding a further folder level.

So how might you reduce the file name while keeping meaning and without compromising the folder names? The current file name ‘RO Brine Discharge EMMP_Rev 2, Amendment 2 (includes Amend 1 text) (draft).docx’ uses 79 characters; it could become any of these:

  • ‘RO Brine Discharge EMMP Rev 2 Amend 2 (incl Amend 1) (draft).docx’ (65 characters), or
  • ‘RO Brine Discharge EMMP Rev 2 Amend 2 (incl Amend 1).docx’ (57 characters), or
  • ‘RO Brine Discharge EMMP Rev 2 Amend 2.docx’ (42 characters, almost half the original file name).

To reduce the number of characters for ALL file paths in this folder, the folder name could be ‘Rev 2 Amend 2’ (13 characters) instead of ‘Rev 2 – Amendment 2’ (19 characters). NOTE: Only rename folders at the time you create the folder. DO NOT change existing folder names without consulting others – many people have shortcuts set to network folders and if you change the folder name in any way (add a space or underscore, fix a typo, etc.) then their links will break and they will not be happy with you.

More information:

(By the way, in case you were wondering… I didn’t count every character manually! I got character counts for each of these file paths by copying the file path into Word 2007, selecting the text, then clicking Word Count on the Review tab.)


  1. We encounter this – it is very difficult to create backups from drives. We have had to zip up folders with long names and manage those. Goes back to the saying – “Just because you can…doesn’t mean you should”

  2. And the result of MS’s “hard-coded limitation” is ….

    1. Ridiculous folder naming conventions adopted on a per-company basis. Result: The every so annoying “But it’s obvious…” comments by older staff to the newbies. Also, extended learning curve(s) to bring the new staff up to speed on the “folder logic”. And yes, “lost documents” because you couldn’t remember when 5 layers deep, which 6 or 7 sub-level to store the file in…
    2. Fairly frequent WTF moments when you see the odd filename(s) due to excessive folder names “taking up” most of the 260 character limit. Result: Many unintentional hilarious filenames, lost files, and people creating “better” filenames in order to hide the first try.

  3. I have download Long Path Tool and it is the best solution of your problem.

  4. Use Long Path Tool to rename, delete, copy, file name validation errors and for many other tasks. I have used this tool countless time and i am very satisfied.

  5. Well, you can use Long Path Tool as well, it works!

  6. if have problem with Long Path/ Long File name. I suggest to try “Long Path Tool” program .
    Trust me it work :)



  7. Try using long Path Tool Program this is very helpful.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: