This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using Windows links


Mellman Thomas wrote in
<BE684E2C997AD51199530002A56B20796C3644@MCHH2A1E>
on Thu, 2 May 2002 16:53:06 +0200:

> There's no h.lnk here.
> Is this just a question of having the right frame-of-mind?

Yes there is. In the same way that the Windows shell always hides the
".lnk" suffix, cygwin1.dll hides it for Cygwin-generated Windows
shorcuts- and only for Cygwin-generated shortcuts. (Cygwin-generated
ones have the read-only FAT/NTFS attribute set as a first clue and
have a marker in them to tell Cygwin that they're symlinks not just
shortcuts.)

If you don't like this, then put "nowinsymlinks" in your CYGWIN
environment variable and ln -s will create old-style Cygwin symlink
files (without any extension) instead of Windows shortcuts.

An example;
$ echo $CYGWIN
binmode ntsec notitle check_case:adjust
$ ln -s "../RFC Copies/rfc0768.txt" .
$ ls -l rfc0768.txt 
lrwxrwxrwx    1 SamEdge  None          130 Apr 29 17:11 rfc0768.txt ->
../RFC copies/rfc0768.txt
$ ls -l rfc0768.txt.lnk
lrwxrwxrwx    1 SamEdge  None          130 Apr 29 17:11
rfc0768.txt.lnk -> ../RFC copies/rfc0768.txt

Looking using CMD.EXE there is only one file "rfc0768.txt.lnk" and
with Explorer you see one file "rfc0768.txt" as a shortcut. (You don't
see the extension in Explorer even with the option to see extension
enabled because HKEY_CLASSES_ROOT\.lnk has a default value "lnkfile"
in the registry and HKEY_CLASSES_ROOT\lnkfile contains an empty string
value called "NeverShowExt." Here ends the Windows shell tutorial.)
;-)

-- 
Sam Edge

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]