Filenames too long and Windows can't open the files

Try substituting the path with SUBST.EXE. It comes with Windows:

C:\Users\shufler>subst /?
Associates a path with a drive letter.

SUBST [drive1: [drive2:]path]
SUBST drive1: /D

  drive1:        Specifies a virtual drive to which you want to assign a path.
  [drive2:]path  Specifies a physical drive and path you want to assign to
                 a virtual drive.
  /D             Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.

What you want to do is substitute one of the folders down the chain for a drive letter:

 C:\>subst X: Q:\Dir1\Dir2\ProjectA\FilesForSomething\SomeotherDirectory\Blahblah\RootOfLongFileNames\LongSubdirectoryName1

Now the LongSubdirectoryName1 folder is accessed on the X: drive. When you're done with it you can delete your substitution with subst X: /D

If you need this all the time, then add it to your login script.

Another approach would be to map a drive further down the chain from wherever Q: is mapped.


You'll need to rename directory names in the path until the name is short enough for the OS to access.

I'd navigate to the first folder whose name you can modify and rename it to a single letter and then do the same for each subsequent folder until you get to the necessary file.

Regarding the necessity of keeping the structure: There are limitations which we have to work within on Operating Systems, and it is not good to routinely operate outside those parameters. Any quick solution now will only ever be a patch that will need to be re-run again in the future. A true solution will involve reorganizing the directory structure such that this extremely long folder path/file name issue is no longer necessary.