Reduce Path Lengths using System Links

Home / Blogs / Reduce Path Lengths using System Links

Sometimes when you’re working with many source files, easily the file paths can go deeper in length and causes you trouble in platforms which has path length limitations. For example, LabVIEW has only a path length of 260 characters, then it starts searching for the same file even if exists in the same location beyond the 260 char path. In such cases, it would be helpful if you can reduce the length of the path but can still maintain a single copy of source files but don’t like to move around copies of source files to root directories.

Solution

My favorite solution for this is to use symlinks or symbolic links. The way symlinks work is pretty much like a shortcut but only that it makes some hard links to the destination folder that path is quite changed from the shortcut located place.

Traditionally I used to do symlinks using command line tools like mklink. An example command is below which as to run with administrative privilages

mklink </D or /H> <Link directory> <Target directory>

There is a quickie graphical tool Link Shell Extension as well which comes down to shell (right click context menus) where symlinks can be quickly setup.

Leave a Reply

Your email address will not be published. Required fields are marked *