Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Subject: Re: how to open *.htm and *.lnk In-Reply-To: <001501c1a837$ef3a0830$34396ba4@ceegs.ohiostate.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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/