This is the mail archive of the
mailing list for the Cygwin project.
Re: Win 2000 : Open Files With Word & Excel From The Command Line
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin at cygwin dot com
- Cc: beforewisdom at yahoo dot com
- Date: Fri, 14 Feb 2003 23:31:54 -0500
- Subject: Re: Win 2000 : Open Files With Word & Excel From The Command Line
- References: <email@example.com>
- Reply-to: cygwin at cygwin dot com
On Fri, Feb 14, 2003 at 10:55:22PM -0500, Steve wrote:
>I put script files called "word" and "excel" in my /usr/local/bin. These
>files have the path to the ms word and ms excel executables.
>They work, they bring up the apps, but I can't get the apps to take
>command line arguments to open remote files.
>cygwin> word c:/docs/memos/parking/myfile.doc
>opens only word not "myfile.doc".
>Is there any way around this? I would love to be able to do this as it
>is monumentally faster then scrolling through a file dialog box or
>explorer to open up a file.
You probably want something like:
[Contents of /usr/local/bin/word]
exec /cygdrive/c/'Program Files/Microsoft Office/Office'/winword `cygpath -w $1`
I don't know if word accepts paths with "forward slashes" or not (don't
think it does) but the above will convert the slashes to backslashes and
will have the added benefit of allowing you to use cygwin style paths,
if you so choose.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html