The only reason Windows still has a 255 character path limit (per directory, not the entire PATH variable) is to support some very old software. The reason is that in the past, many programming languages such as Pascal used strings as such:
"16this is a string"
The first byte of the string held the length of the string. The above string is 17 characters long, and the first byte denotes the string holds a text of 16 characters.
As a byte only counts from 0 to 255, the text could thus be no longer than 255 characters. To make sure that any programs written in these languages could fit any path returned by DOS within a string, the length of the path was capped at 255.
This limitation has been carried forward for some 35 years now, and I think it's about time it's dropped.
Last edited by Katsunami; 01-18-2017 at 04:21 PM.
|