Tuesday, January 24, 2006

Path size limitations in Windows


In 10 years of IT employment, I had never seen this before. A client would try to copy his data to the server, and mid copy would get an error, "Unable to remove directory" (which is a really odd error when you are COPYING) and as I researched it, it was indeed due to a path longer than 260 characters.

Meaning if you create subfolders that are 50 characters each, you will only get 5 subfolders deep before it will not let you create any more! I tested this out:

I created the folder structure to mimick the problem, and it cuts off the last folder at 35 characters.

So C:\temp\123456789012345678901234567890123456789012 34567890\12345678901234567890123456789012345678901 234567890\1234567890123456789012345678901234567890 1234567890\123456789012345678901234567890123456789 01234567890\12345678901234567890123456789012345

is 248 characters long, but not 260... Why? Cause it leaves room for an additional 12 characters so an 8.3 name can still fit and be exactly at the 260 char limit.