Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been doing something on Unix that required a symlink. I want to port my application to Windows. Does Windows have symlinks?

EDIT: I should be more specific. I'd prefer XP. I'll install Vista if I have to.

share|improve this question
add comment

6 Answers

up vote 8 down vote accepted

Windows 2000 and later allows for symbolic linking but refers to symbolic links as junctions. I do not believe you can make them easily without an additional tool, but you can find free tools for creating them.

Free tool: http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

KB Article on Junctions: http://support.microsoft.com/?kbid=205524

share|improve this answer
add comment

On Windows pre-Vista, the best you can do is mounting a drive using the subst command which points to any directory that you want to. I've done this to eliminate the requirements on some applications that need a path without spaces.

Windows Vista included the mklink command.

share|improve this answer
add comment

NTFS 3.0 Junctions most closely represent hard links, and can only be created on directories. Junctions, like hard links, can only referrer to items on the same volume.

Additionally, NTFS allows one to mount other volumes as directories in a file system. This is similar to a symbolic link. The folder will exist if the other volume is not available, but you will receive an error if you attempt to access it in this state.

I haven't found any worthwhile use for junctions. I have used mounting other volumes. I have a USB key which I like to mount at C:\usb. This avoids me having to worry about what random letter it gets assigned to when I plug it into my Windows XP system.

Mount a drive as a path

share|improve this answer
add comment

It does in vista... kind of. See This.

share|improve this answer
add comment

You can create junction points in XP (See http://en.wikipedia.org/wiki/NTFS_junction_point), using the junction tool (http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx)

However I think junctions can only be created for directories (could be wrong - don't have time to do any tests sorry!)

Edit: sparks beat me to it!

share|improve this answer
add comment

Depending on what you're trying to achieve a simple shortcut may be all that is required. Perhaps the simplest way to create one is to right-click the file or folder and select the option to create a shortcut. It will be created inside the current folder but can be cut/copied and placed elsewhere.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.