| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-Id: | <5.1.0.14.2.20020128120845.00b135a0@pop3.cris.com> |
| X-Sender: | rrschulz AT pop3 DOT cris DOT com |
| X-Mailer: | QUALCOMM Windows Eudora Version 5.1 |
| Date: | Mon, 28 Jan 2002 12:17:43 -0800 |
| To: | cygwin AT cygwin DOT com |
| From: | Randall R Schulz <rrschulz AT cris DOT com> |
| Subject: | Re: how to open *.htm and *.lnk |
| In-Reply-To: | <001501c1a837$ef3a0830$34396ba4@ceegs.ohiostate.edu> |
| Mime-Version: | 1.0 |
Hongxun,
Here are the elements you need:
For BASH users (equivalents presumably exist in other shells):
% help test
...
-h FILE True if file is a symbolic link.
-L FILE True if file is a symbolic link.
...
% man readlink
% cygpath --help
Now, write a BASH (or other shell) script that, after using the
aforementioned primitives to get a native Windows name for the target file,
invokes:
cmd /q /c start /b WindowsFileName
You will then no longer need to construct one-off BAT files to open files
from Cygwin. See my message from yesterday with the Subject "CYGWIN=ntsec
Pragmattics" (sic) for a caveat about file permissions and use of the "cmd
..." invocation I mentioned just above.
Randall Schulz
Mountain View, CA USA
At 12:11 2002-01-28, you wrote:
>At the moment, my way to open an htm file is to put its name in a DOS
>batch file, and then run the batchfile, which makes things complicated;
>but by no way can i open an lnk. Any simpler methods ? Thanks
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |