DELETE attempts to erase the specified items. You can delete multiple items at the same time by listing them individually or by using a wildcard to delete a specific set of files matching a pattern. The pattern can specify directory levels, as well as names. To abort a multiple-item DELETE, press Ctrl+C. A multiple-item DELETE aborts if and when it finds something that cannot be removed; for example, a file is delete-protected or in use. A pattern matching DELETE removes everything it can and lists the items that it did not delete, if any.
An error message warns you that you cannot delete directories that still contain files. Override this using the ALL option. DELETE ALL deletes the named directory, its subdirectories, and all files.
File names are displayed on the screen as they are deleted. To suppress the screen output, use the QUIET option.
If the d (deletable) protection bit of a file or directory has been cleared, that item cannot be deleted unless the FORCE option is used.
deletes the file named Old-file in the current directory.
1> DELETE Work/Prog1 Work/Prog2 Work
deletes the files Prog1 and Prog2 in the Work directory and then deletes the Work directory if it contains no other files.
deletes all the files that end in 1 or 2 in directories that start with T.
deletes all the files on DF1:, even those set as not deletable.
See also: PROTECT. For more examples using DELETE, see Chapter 8.
Displays a sorted list of the files in a directory.
DIR [<dir | pattern>] [OPT A | I | AI | D | F] [ALL] [DIRS] [FILES] [INTER] |
|
DIR displays the file and directory names contained in the specified directory or the current directory. Directories are listed first, followed by an alphabetical list of the files in two columns. Pressing Ctrl+C aborts a directory listing.
The ALL, DIRS, FILES, and INTER keywords supersede the OPT A, D, F, and I options, respectively. The older keywords are retained for compatibility with earlier versions of AmigaDOS. Do not use OPT with the full keywords - ALL, DIRS, FILES, or INTER.
Interactive listing mode stops after each name to display a question mark at which you can enter commands. The acceptable responses are shown below:
Enters a directory; the files in that directory are displayed. |
|
Deletes a file or empty directory. DEL does not refer to the Del key; enter the letters D, E, and L. |
|
The COMMAND option allows almost any AmigaDOS command to be executed during the interactive directory list. To issue a command, enter C (or COMMAND) at the question mark prompt. DIR asks you for the command. Enter the desired command, then press Return. The command is executed and DIR continues. You can also combine the C and the command on one line by putting the command in quotation marks following the C.
is equivalent to pressing Q to exit interactive listing mode and return to a regular Shell prompt, then entering:
to display the Prefs.info file on the screen in hexadecimal format.
Formatting a disk from the DIR interactive mode is not recommended since the format takes place immediately, without any confirmation requesters appearing. Do not start another interactive DIR from interactive mode since it results in garbled output.
displays a list of the directories and files on the Workbench disk.
displays all the directories and files on MyDisk that end in .memo.
displays the complete contents of the Extras drawer: all directories, all subdirectories, and all files, including those in the subdirectories.
displays only the directories on Workbench.
begins an interactive list of the contents of the Workbench disk.
For more examples using DIR, see Chapter 8.
Informs the Amiga that you have changed a disk in a disk drive.
You must use the DISKCHANGE command to inform the system when you change disks or cartridges in 5.25 inch floppy disk drives or removable media drives without automatic diskchange hardware.
If a requester asks you to insert a new disk into your 5.25 inch drive, known as DF2:, you must insert the disk and then enter:
AmigaDOS then recognizes the new disk and you can proceed.