Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

Opening files from cygwin shell

  • Please log in to reply




  • Member
  • PipPip
  • 10 posts
Not sure if this is the right forum for this, but I think it's the most appropriate.

I'm having trouble opening text documents from the cygwin command line, with both Microsoft Word and Wordpad. I put the following scripts in my cygwin/usr/local/bin directory:

wordpad (file name), containing:

exec /cygdrive/c/'Program Files/Windows NT/Accessories'/WORDPAD `cygpath -w $1`


word, containing:

exec /cygdrive/c/'Program Files/Microsoft Office/Office11'/winword `cygpath -w $1`

When I try to open a file with, e.g., the command:

word example.txt

... Word opens but instead of the file I get a message:

Word experienced an error trying to open the file.
Try these suggestions:
*Check the file permissions for the document or drive
*Make sure there is sufficient free memory and disk space
*Open the file with the text recovery converter

But I'm able to open the same file from Windows explorer. Similarly, when I try:

wordpad example.txt

... Wordpad appears to open, but I get a message:

Failed to open document

and then wordpad quits.

I'm probably making some very simple mistake, but if anyone could help I'd really appreciate it. Thanks.
  • 0


Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP