views:

12072

answers:

13

Related
In .NET, how do I Create a Junction in NTFS, as opposed to a Symlink?

I've tried Winbolic (Windows XP), but I can't get it to work the way I want.

Am I wrong here?

If I create a symbolic link within a folder in my %PATH%, the referenced directory should work as if it had actually been added to %PATH%, right?

A: 

I haven't heard of Winbolic but I'm not aware of anything built-in that will give you this functionality. Perhaps Winbolic just adds some functionality to explorer.exe to simulate symlinks, and this is why it's not working for you in other places?

pix0r
+9  A: 

Have you looked at Junction? Also, Windows Vista introduced the mklink command line tool to create symbolic links. Scott Hanselman has a write-up on it at http://www.hanselman.com/blog/MoreOnVistaReparsePoints.aspx. If you're speaking solely about Windows XP, I've only ever used the Junction tool.

David Mohundro
+1  A: 

Try subst


subst r: d:\winnt\system32
subst v: c:\vf

Jay Mooney
A: 

Windows uses shortcuts as symlinks; there isn't any other way (that I know of) to create the equivalent of a symlink.

The file system does support hard links, but Windows doesn't actually provide a way to do it. I believe sysinternals provides a mechanism for hard links, though.

EDIT: as @David Mohundro pointed out (while I was typing this), Junction is the thing I was thinking of from the sysinternals guys.

pkaeding
+4  A: 

do you mean a hard-link or a soft-link?

a soft-link you can create by drag-drop with right-button.

FSUTIL can be used on the command line

TheSeeker
Usage : fsutil hardlink create <new filename> <existing filename> Eg : fsutil hardlink create c:\foo.txt c:\bar.txt
bdukes
A: 

A few weeks ago I had the problem to make a symbolic link to a network share. This helped: http://www.pearlmagik.com/winbolic/ :

Winbolic Link creates special folders which serve as links to the contents of another folder. They are functionally similar to "symbolic links" or "symlinks" which unix users are familiar with.

akr
A: 

Junction is a great utility but one thing to watch for is that junction points look exactly the same as ordinary folders in Windows Explorer.

Use 'junction.exe -s' on the command line to list all junctions in folders and sub-folders.

Jonathan Webb
A: 

Have you tried linkd from Windows 200x Resource Kit? I've heard that it does for pre-Vista versions of Windows same thing that mklink does for Vista which is what you are looking for.

Alan Mendelevich
+3  A: 

the referenced directory should work as if it had actually been added to %PATH%, right

No, if you had C:\bin added to your %PATH% and inside c:\bin you created a Junction called c:\bin\anotherDir\ to point to c:\anotherDir\ so that you could run some.exe from the command line like:

> anotherDir\some.exe

This would not work since the %PATH% variable does not work with sub directories (symlinked or not)

you would need to create a hardlink directly to some.exe, so the hardlink c:\bin\some.exe points to c:\anotherDir\some.exe

So in summary I don't believe you can do exactly what you are asking. That said I do recommend Link Shell Extension for creating Junctions and hardlinks. It offers more capabilities than most junction tools in a very easy to use windows explorer extension

Luke P M
A: 

Here is an article that discusses every aspect of symlinks on windows:

http://www.shell-shocked.org/article.php?id=284

joedevon
A: 

Try Symlinker a GUI tool to create Symlink in Windows works on all windows Versions

taranfx
A: 

DOESN'T work on XP, at least doesn't span symlinks across volumes.

shivshaksar
A: 

DOESN'T work on XP: doesn't make symlinks across volumes.

syam