ghacks Technology News

Create NTFS Junctions aka Directory symbolic links


I have been writing about the sweet little tool Junctions before but it got somehow lost among more popular articles back then and I decided to give it another try. A Directory Symbolic Link is a link from another drive or directory to an existing directory. NTFS Junctions could be used for instance to access the folder d:\mp3 from a symbolic link in c:\mp3.

Junction was created by Mark Russinovich and is freely available on the Microsoft homepage. The software has a size of only 41K and can only be used from the command line. I’m using several NTFS junctions to be able to access my most important directories from several of my hard drives.

Let us take a look at the example from above and create a NTFS junction from c:\mp3 to d:\mp3. To create the junction you open the command line and write the following code: junction c:\mp3 d\:mp3. If the folder c:\mp3 is not existing it will be created by the command line tool.

You do not have to name them the same way. You could as easily create another junction that links from f:\music to d:\mp3 as well.

This is in my opinion a very nice way of being able to access folders from different hard drives easily. To delete a junction you use the code: junction -d c:\mp3

You should note that you can’t use the root directory of a hard drive as the folder that you want to link to. You do need to specify at least one folder. It is also only possible to use junctions on ntfs hard drives.




Tags: , , ,
Categories: Operating Systems, Tools, Windows



Related posts:

NTFS Link Windows Shell Extension
Junction
NTFS Alternate Data Streams
Change the default Command Prompt directory
How to move the bookmarks in Firefox 3
Link Shell Extension
Get to know Linux: Links
Create Folder Drives

4 Responses to “Create NTFS Junctions aka Directory symbolic links”

  1. Terence Hill says:

    Why do it with the command prompt?
    I think it’s better HardLink ShellExtension, you can use it for junctions, hardlinks, and symbolic links.
    http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

    Hi

  2. fredden says:

    If you’re looking to what’s claimed not to work in the last paragraph, you should look at the “Disk Management” utility. It can mount an entire filesystem to a drive letter, or to a mount point within another mounted drive. Note: this method only works for entire filesystems. If you want to link just a directory, then use the Junction stuff above.

    On another note, why can’t one “Junction” a file? We’ve had this functionality as part of a standard build in Linux/*BSD for *years*.

  3. Martin says:

    Fredden you have to ask Microsoft the last question ;)

  4. AfricanBoy says:

    Someone posts a nice tool for windows and some people just have to bring in a linux reference.

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

© 2005-2009 Ghacks.net. All Rights Reserved. Privacy Policy - About Us