Subject: Re: Symbolic Links
From: Brian Dessent <[email-masked]>
To: [email-masked]
Date: Mon, 15 Dec 2003 18:56:17 -0800

Dan Adams wrote:
> 
> My question was, is there any way to use the cygwin links, not the windows
> ones, to also be able to work in the open dialog box in MS Office products
> like excel for example. As I said, it is working in windows explorer. The
> only reason why I was mentioning about the windows links is because they
> were working in excel and I figured it would be a good example.

If your filesystem is NTFS (and $deity hope it is, as FAT32 hurts like
something awful) then you can try fooling around with its built in
symbolic links, which are called junctions in the parlance.  There are
no built-in tools to do this but the venerable Mark Russinovich again
comes to the rescue with his freeware: 

from <http://www.sysinternals.com/ntw2k/source/misc.shtml#junction>:

Junction

Win2K's version of NTFS supports directory symbolic links, where a
directory serves as a symbolic link to another directory on the
computer. For example, if the directory D:\SYMLINK specified
C:\WINNT\SYSTEM32 as its target, then an application accessing
D:\SYMLINK\DRIVERS would in reality be accessing
C:\WINNT\SYSTEM32\DRIVERS. Directory symbolic links are known as NTFS
junctions in Win2K. Unfortunately, Win2K comes with no tools for
creating junctions - you have to purchase the Win2K Resource Kit, which
comes the linkd program for creating junctions. I therefore decided to
write my own junction-creating tool: Junction. Junction not only allows
you to create NTFS junctions, it allows you to see if files or
directories are actually reparse points. Reparse points are the
mechanism on which NTFS junctions are based, and they are used by
Win2K's Remote Storage Service (RSS), as well as volume mount points. 

If you want to view reparse information, the usage for Junction is the
following: 

Usage: junction [-s] <directory or file name> 

-s	Recurse subdirectories. 

If you want to create or delete a junction, use Junction like this: 

Usage: junction [-d] <junction directory> [<junction target>] 

To delete a junction specify the -d switch and the junction name. 

Download Junction (16KB) 

Download Junction Source (22 KB) 
>>

I have not tried this but it sounds like it might be helpful for you.  I
have no idea how Cygwin would interact with one of these, but since it's
layered on top of Windows' kernel NTFS driver I would expect that it
would treat them just as any other app would, i.e. do the right thing.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/