Previous Next Chapter

Format

QUIT [<return code>]

Template

RC/N

Location

Internal

QUIT stops the execution of the script at the specified return code. The default return code is zero. We recommend you use the standard return code values of 5, 10, and 20.

Example:

ASK "Do you want to stop now?"
IF WARN
QUIT 5
ENDIF
ECHO "OK"
ECHO "The script is continuing."

If you press Y at the prompt, the script is aborted, since WARN is equal to a return code of 5. If you press N or press Return:

OK
The script is continuing.

Is displayed in the Shell window.

RELABEL

Changes the volume name of the disk in the given drive to the specified name.

Format

RELABEL [DRIVE] <drive> [NAME] <name>

Template

DRIVE/A,NAME/A

Location

C:

Volume names are set when disks are initially formatted. RELABEL allows you to change a disk's volume name to any name specified.

On floppy-only systems with one drive, be sure to specify the disks by volume name instead of drive name.

Examples:

1> RELABEL Workbench: MyDisk

changes the name of the Workbench disk to MyDisk. No colon is necessary after the second name.

1> RELABEL DF2: DataDisk

changes the name of the disk in DF2: to DataDisk.

REMRAD

Removes the recoverable RAM disk.

Format

REMRAD [<device>] [FORCE]

Template

DEVICE,FORCE/S

Location

C:

REMRAD allows you to remove the recoverable RAM disk (usually mounted as RAD:) from memory without powering off the system. If you have mounted more than one recoverable RAM disk, use the DEVICE specification.

REMRAD instructs RAD: to delete all of its files and become inactive. However, the RAD: RAM_0 disk icon does not disappear. The next time the Amiga is rebooted. RAD: is removed from memory completely and the icon is no longer displayed.

If the device is in use when the REMRAD command is given, the operation aborts with a device in use message. To remove it if it is in use, you must use the FORCE option.

RENAME

Changes the name of or moves a file or directory.

Format

RENAME [FROM] {<name} [TO | AS] <name>

Template

FROM/A/M,TO=AS/A,QUIET/S

Location

C:

RENAME renames the FROM file or directory with the specified TO name. The FROM and TO files or directories must be on the same volume. If the name refers to a directory, RENAME changes the directory name without changing the names of the files or subdirectories in that directory. When there are multiple items in the FROM argument, the TO argument must be a directory.

If you rename a directory or if you use RENAME to give a file another directory name, AmigaDOS changes the position of that directory or file in the filing system hierarchy. This effectively moves the items.

Example 1:

1> RENAME Work/Ex1 AS :Test/Ex2

renames the file Ex1 as Ex2 and moves it from the Work directory to the Test directory. The Test directory must exist in the root directory for this command to work.

Example 2:

1> RENAME 3.doc 5.doc a.doc TO Docs

moves the 3.doc, 5.doc, and a.doc files to the Docs directory. The Docs directory must already exist.

REQUESTCHOICE

Allows AmigaDOS and ARexx scripts to use custom requesters.

Format

REQUESTCHOICE >TITLE> <body> {<gadgets>} [PUBSCREEN <public screen name>]

Template

TITLE/A,BODY/A,GADGETS/A/M,PUBSCREEN/K

Location

C:

The <title> argument specifies the title of the requester.

The <body> argument specifies the text of the requester. Linefeeds can be embedded using *N.

The <gadgets> argument specifies the text for the different gadgets. The gadget labels are separated with spaces.

The number of the selected gadget is printed as a result to the console. For evaluation in a script file, you can redirect this output into an environment variable. If the requester cannot be opened, the command generates a return code of 20.

The PUBSCREEN argument allows the requester to open its window on a public screen.

Example:

1> RequestChoice >ENV:rcnum "New Title" "This is my requester*nSelect a gadget" "OK" "Maybe" "Cancel"

Figure 6-1. Sample RequestChoice Requester

ENV:rcnum contains 0, 1, or 2 after a gadget is selected. The script can use this value to control its later execution.

REQUESTFILE

Allows AmigaDOS and ARexx scripts to use a file requester.

Format

REQUESTFILE [Drawer <drawer name>] [FILE <file>] [PATTERN <pattern>] [TITLE <title>] [POSITIVE <text>] [NEGATIVE <text>] [ACCEPTPATTERN <pattern>] [REJECTPATTERN <pattern>] [SAVEMODE] [MULTISELECT] [DRAWERSONLY] [NOICONS] [PUBSCREEN <public screen name>]

Template

DRAWER,FILE/K,PATTERN/K,TITLE/K,POSITIVE/K,NEGATIVE/K,ACCEPTPATTERN/K,REJECTPATTERN/K,SAVEMODE/S,MULTISELECT/S,DRAWERSONLY/S,NOICONS/S,PUBSCREEN/K

Location

C:

When entered with no arguments, a file requester with OK, Volumes, Parent, and Cancel buttons is created. Ist Drawer and File gadgets are empty and it displays the contents of the current directory.

The DRAWER argument specifies the initial contents of the Drawer gadget.

The FILE option specifies the initial contents of the File gadget.

The PATTERN option allows the use of a standard AmigaDOS pattern. It includes a Pattern gadget in the requester and specifies the initial contents of the gadget. If this option is not provided, the file requester does not have any Pattern gadget.

The TITLE option specifies the title of the requester.

The POSITIVE option specifies the text to appear in the positive (left) choice in the file requester.

The NEGATIVE option specifies the text to appear in the negative (right) choice in the file requester.

The ACCEPTPATTERN option specifies a standard AmigaDOS pattern. Only files matching this pattern are displayed in the file requester.

The REJECTPATTERN option specifies a standard AmigaDOS pattern. Files matching this pattern are not displayed in the file requester.

If SAVEMODE is specified, the requester is used for writing files to disk. If MULTISELECT is specified, the requester allows multiple files to be selected at once. If DRAWERSONLY is specified, the requester does not have a File gadget. This effectively turns the file requester into a directory requester. If NOICONS is specified, the requester does not display icons (.info files).

The selected files are returned on the command line, enclosed in double quotation marks and separated with spaces. The command generates a return code of 0 if you select a file or 5 if you cancel the requester.

The PUBSCREEN argument allows the requester to open its window on a public screen.

Example:

1> REQUESTFILE DRAWER Devs: TITLE "My Req" NOICONS

Figure 6-2. Sample RequestFile Requester

Top Previous Next Chapter