Open Files with Application

See the download page to obtain this program

Description

This script starts applications for the files given as parameters. If a file extension is not given, a file with an extension is used if it is unique. If the file extension is not unique, the first one alphabetically is proposed and so on. Extensions ending with ~ or .backup are assumed to be backup files and are ignored. Files with a .lck extension are taken as lock files and are also ignored.

This program overrides the standard open. Its directory must therefore appear ahead of the directory for the standard open (i.e. /usr/bin/open) in $PATH.

Options

Options of the standard open are respected:

-a app_name
the application name to use
-p
print the file

Usage

As an example, file myfile.frame can be opened in the usual way:

  open myfile.frame

However, the point of the new command is to avoid having to specify the suffix:

  open myfile

This file could also be opened using Edit.app:

  open -a Edit myfile

History

First public version by Ken Turner, 13/12/95


Up one level to NEXTSTEP/OPENSTEP Utilities

Web Ken Turner Home   Email    Search Search Web Pages

Last Update: 15th July 2006
URL: http://www.cs.stir.ac.uk/~kjt/software/nextstep/open.html