• Aucun résultat trouvé

only one drive, this will be dfO: (the same as '—'

Dans le document Lt QU (Page 158-166)

your FROM device). Single-drive DISKCOPY operations require that both the source and destination disks be removed and reinserted multiple times. The version of DISKCOPY shipped as part of AmigaDOS 1.0 and 1.1 re quires that each disk on a 512K system be in serted three times. On a 256K system,

DISKCOPY requires eight insertions of each disk. If you own a 256K single-drive system, consider adding additional memory or another disk drive to make life with DISKCOPY more bearable. If your system has two drives, no disk swapping during the copy process is required as long as you specify different drives for the FROM and TO devices.

[NAME volname] The volume name that will S ~~ I be given to the copy of the original disk. If the '—' volume name contains spaces, it must be en

closed by quotation marks. If volname is not specified, the copy will have the same name as the original. AmigaDOS can still distinguish be tween volumes with the same name based upon information stored on the duplicate disk. The NAME keyword is required if a volume name is specified.

When DISKCOPY is invoked, you'll be prompted to insert the disks required to com plete the copy operation. Status messages keep you advised as each track is copied. A standard AmigaDOS format 3V2-inch disk requires 80 tracks of information to be read and written.

n

n

DISKCOPY Command

You can stop the copy process after issuing the command—when the system is waiting for the disk(s) to be inserted—by pressing CTRL-C followed by the RETURN key. You'll then be returned to the CLI prompt. If you press CTRL-C after the copy process has started, the copy is abandoned, and all information already on the destination disk is lost.

Examples i. Make a copy of a disk with a single-drive system. The copy is to have the same volume name as the original:

DISKCOPY FROM df0: TO df0:

2. Make a copy of a disk on a dual-drive sys tem, copying the original from the external drive to the Amiga's internal drive. The copy is to have the same volume name as the original:

DISKCOPY FROM dfl: TO df0:

3. Make a copy of a disk with a dual-drive sys tem, copying the original from the internal drive to the external drive. The copy is to be named King Keizers Lament:

DISKCOPY df0: TO dfl: NAME "King Keizers Lament"

Note: In this example the optional FROM keyword has been omitted. Quotation marks . enclose the copy's volume name since it in

cludes spaces.

ECHO Command

ECHO Command

Purpose ECHO is used in command files to display a message on the system screen. This is most often helpful when the RUN command is being used to carry out a background operation whose completion would otherwise not be readily apparent to the user. See Chapter 5 for more information on using ECHO.

Format

Explanation of Parameters and Keywords

ECHO string

string The message to be written to the cur rently active output stream. While the current output stream will usually be the system dis play, it may also be a file or device. If it con tains spaces, string should be contained within quotation marks.

Examples l. A command file that executes a background SORT of a file called sortsource on the external drive to a file called sortdest on the same drive and notifies you when the operation is complete:

RUN SORT FROM dfl:sortsource TO dfl:

sortdest + ECHO "Sort Complete"

2. A command file that executes a background COPY of all files and subdirectories in a direc tory called work/mydir on the current default drive to a directory called storage/archive on the same drive:

RUN COPY FROM :work/mydir TO :storage/

archive ALL QUIET + ECHO "That's All Folks"

3. Create a one-line file called joey that con tains the text string 7 have the power:

ECHO > :Joey "I have the power"

ED Command

ED Command

Purpose

Format

Explanation of Parameters and Keywords

Examples

The ED command is used to edit the contents of a file using AmigaDOS's full-screen editor. See Chapter 6 for complete information on using the full-screen editor.

ED [FROM] name [SIZE] n

[FROM] name The name of the AmigaDOS file which you wish to edit using the full-screen editor. If name is the first argument in an ED command statement, the FROM keyword need not be specified. If the file already exists, its contents are loaded into the editor's workspace.

If the file doesn't already exist, it is dynamically created by the editor.

[SIZE] n SIZE n is used to set the size of the editor's workspace. If n is the second argument in an ED command statement, the SIZE key word need not be given. If no value for n is specified, the editor's default workspace is 40,000 bytes. To edit files larger than that, spec ify SIZE n with a value for n larger than the size of the file to be edited. If the workspace size selected is not large enough, the editor will display the message SIZE of n too small

1. Invoke AmigaDOS's full-screen editor to edit a file called WorklnProgress in the Current/Stuff directory:

ED : Current/Stuff/WorklnProgress

2. Invoke AmigaDOS's full-screen editor to edit a 90,000-byte file called Big in the root directory of drive dfl:.

ED dfl:Big SIZE 100000

EDIT Command

The EDIT command is used to edit the contents of a file using AmigaDOS's line editor.

Unless you're a real fan of line editors, give AmigaDOS's full-screen editor (ED) a try first.

The full-screen editor is both more flexible and easier to use than EDIT. In all fairness, EDIT does have the ability to edit binary files and can execute a prestored list of line editor commands, which may be handy features for some users.

See Chapter 7 for detailed information on EDIT.

EDIT [FROM] fromname [TO] toname [WITH]

withname [VER] vername [OPT option]

[FROM] fromname The name of the file whose contents will be edited. If fromname is the first argument in the EDIT command, the FROM keyword is optional. EDIT requires fromname, and it must already exist.

[TO] toname The name of the file to which the edited text is saved when a Q or W sub command is executed from within the line edi tor. If toname is the second argument in an EDIT command (following fromname), the TO keyword is optional.

If toname is different from fromname, the contents of the file used as input to the editor will not be replaced by a save from within the line editor. If toname is not specified and a save is executed from within EDIT, the contents of the original file will be moved to a temporary file called :t/editbackup, and EDIT will rename its work file (where it temporarily holds edited data) to fromname.

[WITH] withname This option lets you spec ify a file which will be used as input to the line editor's command processor. The contents of withname should be a series of valid line editor

u

u

n

n n n n n

EDIT Command

subcommands. If withname is the third argu ment in an EDIT command (following fromname and toname), the WITH keyword is optional. IF withname is not specified, the line editor expects manual input from the keyboard.

[VER] vername Lets you specify where you want messages and verification output produced by the line editor sent; vername may be a file or logical device. If vername is the fourth argument in an EDIT command (following fromname, toname, and withname), the VER keyword is optional.

[OPT Pn or OPT Wn or OPT PnWn] These options let you set the maximum line length (Wn) and number of lines (Pn) that EDIT will keep memory resident. The default maximum line length is 120. The default number of lines is 40. Multiplying the value for Pn by Yin yields the amount of memory that EDIT reserves as a temporary work area. If either Pn or Wn is to be specified, the OPT keyword must be used.

Examples i. Edit a file called mysource in the current directory, using AmigaDOS's line editor. The edited data, if saved, will be stored under the same filename. The number of lines is to be set to 40 and line width to 120 (EDIT's default values):

EDIT mysource

2. Edit a file called bigsource in the current directory, using AmigaDOS's line editor. The edited data, if saved, will be stored under the filename edited bigsource. The number of lines is to be set to 1000 and line width to 120:

EDIT PROM "bigsource TO "edited bigsource"

OPT P1000

EDIT Command

u u

3. Edit a file called universe in the current direc tory, using AmigaDOS's line editor. When EDIT starts up, execute the list of line editor com mands contained in a file called autocommands in the myprocess/nebula/ directory on drive dfl:. The edited data, if saved, will be stored under the same filename. Send all messages and verification displays from the line editor to the system printer. The number of lines is to be set to 40 and line width to 250:

EDIT universe WITH dfl:myprocess/nebula/

autocommands VER PUT: OPT WS50

u

156

n n n n n n

ENDCLI Command

ENDCLI Command

Purpose

Format

Explanation of Parameters and Keywords Example

ENDCLI terminates the current Command Line Interpreter. ENDCLI should be issued only to a CLI that has been created with the NEWCLI command or to a CLI that has been opened from the Amiga Workbench environment by double-clicking a CLI icon.

ENDCLI None

Open a new CLI window and issue a directory command within the new CLI. Close the CLI window with the ENDCLI command, returning to the CLI from which the NEWCLI command was issued:

NEWCLI

Note: A new CLI window will appear on your screen. The next two commands will ap pear within the new window as they're typed:

DIR ENDCLI

EXECUTE Command

EXECUTE Command

Purpose

Format

The EXECUTE command is used to invoke AmigaDOS command sequence files. Command sequence files contain a prestored series of com mands which are executed sequentially once the command file has been started by EXECUTE.

EXECUTE can also pass information to the com mand sequence file to be used as arguments for the commands contained therein.

Command files may be nested by issuing an EXECUTE as one of the commands in the command sequence file.

EXECUTE name [argl arg2,,,,]

Explanation name The name of the command sequence

Dans le document Lt QU (Page 158-166)