dfindfile - Find a file using search paths, defaults and wildcards.

Function

Find a file using search paths, defaults and wildcards.

Synopsis

dfindfile [options] file [file...]

Description

This program will return the a name which can be used to open given files, after the application of defaults, wildcards and search paths. For example,

dfindfile "FRED_DIR:*.c"

dfindfile -default "*.c" FRED_DIR:

will both search the envionment variable/logical name search path FRED_DIR for all .c files and return names that be be used in an open statement. Under VMS, a search path is a logical name directorysearch path. Under UNIX/VxWorks, a search path is a colon separated list of directory names (in the format used by the PATH environment variable)

For application of defaults, each filename is broken up into three components, the directory spec, the filename and the file type. If a component is not supplied by the file specification, then it is taken from the default specification, if supplied.

Wildcards appropiate to the machine on which the program is being run can be specified.

Note the requirement for quotes around anything which may be interpeted by the shell.

Options;

-default name
Specifies defaults file name components.
-oneonly
Return only the first file found. By default, all files which match the specification are return.
-nowild
Disallow wildcards.

See Also

Dul library document, dparsefile(1), DulFindFile(3).

Author

Tony Farrell, AAO

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tjf@aaoepp.aao.gov.au