Previous Next Chapter

Special AmigaDOS Characters

There are several characters that have special meanings when used in AmigaDOS. The functions of special characters include the following:

It is important when using AmigaDOS to remember the various special functions that characters can have. Note that in different contexts the same character can have different effects or have no special effect. If a command that appears correct produces unexpected results, check to see if any character in the command has a special function.

Command Line Characters

The colon and slash characters are reserved by AmigaDOS for specifying paths. In file requesters, on the command line, or in scripts these characters are used only to separate components on the path line.

Colon (:)

Colons are used to designate device names (DF0:), volume names (Workbench:), and assigned directories (SYS:). There are no spaces before the colon, unless it is the first character in the path, or between the colon and subsequent file or directory names in a path. Used by itself, the colon represents the root directory of the current volume. The following are examples of legal uses of the colon:

1> DIR DEVS:
1> DIR DF0:Pictures
1> DIR :Prefs
1> DIR :

Slash (/)

Slashes are used within paths to separate directories and file names. For example:

1> LIST Reports/Salesreps/Eastern

The three directory levels are separated by slashes; this example lists the Eastern subdirectory.

Entering a single slash moves the current directory structure up one level. For example, if Reports/Salesreps/Eastern is the current path, entering the following:

1> CD /

changes the directory path to Report/Salesreps. Using two slashes moves upt two levels, and so on.

Double quotation mark (")

The double quotation marks by itself does not have any special meaning. However, you may occasionally need to use double quotation marks around a command argument for the command to work properly. Since AmigaDOS uses spaces as an argument separator, you must enclose an argument (such as path) that contains spaces in double quotation marks to keep the Shell from interpreting the parts of the argument as separate arguments. For example, the following is incorrect:

1> COPY Ram Disk:foo TO SYS:Otherdir

It produces an error message because there is a space in the path. The command indicates that there are two items to be copied, when only one is intended. Enclosing the path in quotation marks forces it to be treated as a single argument:

1> COPY "Ram Disk:foo" TO SYS:Otherdir

Using double quotation marks with nothing between them is a quick way to reference the current directory. For example:

1> COPY DF0:public.library TO " "

If the current directory is LIBS:, the public.library file is copied there.

Plus (+)

The plus sign, when entered with the RUN command, concatenates several commands entered on subsequent lines into a single command line. For further information and examples, see the RUN command in Chapter 6.

Question mark (?)

One of the special uses of the question mark is to display a command's template. The template is an online reminder of the command's arguments. To display a specific command's template, enter the command name followed by a space and then the question mark, with no other arguments:

1> TYPE ?
FROM/A/M, TO/K, OPT/K, HEX/S, NUMBER/S:

The Shell displays the template. It also allows you to enter the arguments for the command with which you have used the question mark. Enter arguments for the command after the colon. Be sure to enter only the arguments and keywords needed before pressing Return.

Top Previous Next Chapter