Symbolic Links in Windows

Symbolic links are used all the time on Linux and Unix systems, but I didn’t know they existed on Windows. It turns out, however, that Windows 2000 and higher also supports symbolic links — or junctions as they are called. You can use the program Junction v1.05 to create a link between two directories.

This comes in handy if you need to map a path from one machine to a path on another machine. For example, I have Perl CGI scripts that I run on both my Windows laptop and on a Linux server. I have been changing the shebang line from #!/usr/bin/perl to #!C:/perl/bin/perl. Using junctions, I can now simply link C:/perl to C:/usr, and the #!/usr/bin/perl line will work on both Windows and Linux.

I found this solution on Thierry Bothorel’s web page Symbolic links in Windows.

One comment

  • June 25, 2009 - 3:09 am | Permalink

    I use “ScriptInterpreterSource registry” in Apache to run programs based on extension.

  • Leave a Reply

    Your email address will not be published.

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>