delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/14/23:30:43

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
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 14 Feb 2003 23:31:54 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Cc: beforewisdom AT yahoo DOT com
Subject: Re: Win 2000 : Open Files With Word & Excel From The Command Line
Message-ID: <20030215043154.GB2654@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com, beforewisdom AT yahoo DOT com
References: <b2kdhh$jeb$1 AT main DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <b2kdhh$jeb$1@main.gmane.org>
User-Agent: Mutt/1.5.1i

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.
>
>For example:
>
>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]

#!/bin/sh
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.

cgf

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019