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/