Windows path length limit

It really seems that Windows does indeed have a path limit.

While checking some files into a subversion repository:

  • The repository was D:\Adrian\my-respository
  • Within the repository I had quite a deep directory structure, to access this particular project
  • Within this particular project, the IDE I was using had a few levels of directories, to include "work/src" and so on
  • The class path of the Java classes was quite deep, "com/company/project" etc
  • Subversion itself puts a few levels of dirs in ".svn/text-base" and so on

While checking in all this stuff, I got the error "path invalid" suddenly. And opening the created .svn directory in Windows Explorer, right-clicking, and chooseing "new directory" immediately brought up the error:

Cannot create 'New Folder': path invalid

So it seems paths have a limit in Windows. The existing working path was 220 characters long, with 20 directories including the working directory and the hard disk's root directory.

This is all very annoying, as I can't really do anything about any of the above reasons why the path is so long.

Leave a Reply