Amos Professional Manual  Contents  Index

Disc Access


The pathway for a listing can be further narrowed by requesting that only the filenames that satisfy certain conditions will be printed, and that each character in the filename must match the characters in your request exactly. If you wish to make a more general search, you can use the asterisk character "*" to be regarded as a substitute for any list of characters in a filename, up to the next control character. For example, a file named "Music" will be searched for if you command this:

X> Dir "Music"

But the use of an asterisk would broaden the search:

X> Rem List all files starting with M
   Dir "M*"

That could give the following directory listing:

Music
Megalomania
Milk

As a default, this option ignores any files that include extensions of the type used by MS-DOS, such as "Mad.Asc".

The full stop character "." is used to match a filename extension, and is often used with the asterisk character to list all the files in a directory with a particular extension, like this:

X> Dir "Music.*"
   Dir "*.Megalomania"
   Dir "*.*"

The final narrowing of a search path is to use the question-mark character "?" to match up with any single character in a filename. For example:

X> Dir "EUROP????"

That would list the following filenames, if they were in the current directory:

EUROPRESS
EUROPEANS

But it would ignore the following filenames, either because the first five characters do not match, or the length of the name is different from the specified total of nine characters:

EUROPRESSES
EUROPE
EURIPIDES

Because certain filenames are too long to fit neatly in a display listing, particularly if the DIR/W option is in use, there is a simple way of setting the style of directory commands.

Back    Next
10.02.03