![]()
These are the AmigaDOS commands found in the C directory with an explination of the command and an example.
Addbuffers
Format: Addbuffers Drive/A Buffers/N
Purpose: Add memory to floppy disk buffers to improve speed
Example: Addbuffers DF0: 10
AddDatatypes
Format: AddDataTypes files/M QUIET/S REFRESH/S
Purpose: Activates datatypes or adds another datatype
Example: AddDataTypes gif.datatype REFRESH
Alias
Format: Alias Name String/F
Purpose: Assigns a short name to a command.
Example: Alias Del Delete
Ask
Format: Ask Prompt/A
Purpose: Asks a question in a script (reply y/n). Use IF WARN
to test for a yes.
Example: Ask "Are you sure? Y/n"
Assign
Format: Assign Name Target/M LIST/S EXISTS/S DISMOUNT/S DEFER/S
PATH/S ADD/S REMOVE/S VOLS/S DIRS/S DEVICES/S
Purpose: Assign names to directory paths.
Example: Assign PPaint: DH0:PPaint
Avail
Format: Avail CHIP/S FAST/S TOTAL/S FLUSH/S
Purpose: Memory availablility
Example: Avail TOTAL
Binddrivers
Format: BindDrivers
Purpose: Load device drivers for old hardware.
Example: BindDrivers
Break
Format: Break Process/A/N ALL/S C/S D/S E/S F/S
Purpose: Stop a program (see Status)
Example: Break 2 C
CD
Format: CD Dir/A
Purpose: Change directory
Example: CD Text_Files
ChangeTaskPri
Format: ChangeTaskPri Pri=Priority/A/N Process/K/N
Purpose: Changes program's execution priority (see Status)
Example: ChangeTaskPri 2 1
Conclip
Format: ConclipUnit/N OFF/S
Purpose: Activates clipboard device
Example: Conclip 1
Copy
Format: Copy From/M To/A ALL/S QUIET/S BUF=BUFFER/K/N CLONE/S
DATES/S NOPRO/S COM/S NOREQ/S
Purpose: Copy files (with/without protection bits)
Example: Copy mydoc.txt docs: Dates
CPU
Format: CPU CACHE/S BURST/S NOCACHE/S NOBURST/S DATACACHE/S DATABURST/S
NODATACACHE/S NODATABURST/S INSTCACHE/S INSTBURST/S NOINSTCACHE/S
NOINSTBURST/S COPYBACK/S NOCOPYBACK/S EXTERNALCACHE/S
NOEXTERNALCACHE/S FASTROM/S NOFASTROM/S NOMMUTEST/S CHECK/K
Purpose: Change or display CPU settings e.g. caches, burst, fastrom
Example: CPU INSTCACHE FASTROM
Date
Format: Date Day Date Time To=Ver/K
Purpose: Display/change date or time
Example: Date To=date.txt
Delete
Format: Delete File/M/A ALL/S QUIET/S FORCE/S
Purpose: Delete files and/or directories
Example: Delete OldFilesDir All
Dir
Format: Dir Dir Opt/K ALL/S DIRS/S FILES/S INTER/S
Purpose: List contents of a directory
Example: Dir S: Files
Diskchange
Format: Diskchange Device/A
Purpose: Tell Amigados that a disk has been swapped in a
non-autosensing disk drive
Example: Diskchange DF2:
Diskcopy
Format: Diskcopy From/A To/A Name/K NOVERIFY/S MULTI/S
Purpose: Duplicates disks
Example: Diskcopy DF0: to DF1:
DiskDoctor
Format: Diskdoctor Drive/A
Purpose: Repairs disk problems (in place). Deprecated in WB2.
Example: DiskDoctor DF0:
Echo
Format: Echo String/M NOLINE/S FIRST/K/N LEN/K/N TO/K
Purpose: Display text in a script or part of a string of text
Example: Echo "Enter your name: " NoLine
Ed
Format: ED From/A Size/N With/K Window/K Tabs/N Width=Cols/N
Height=Rows/N
Purpose: Edit text files (screen editor)
Example: ED S:User-Startup
Edit
Format: Edit From/A To With/K Ver/K Opt/K Width/N Previous/N
Purpose: Edit text files (line editor)
Example: Edit s:User-Startup With Ed-Script
Else
Format: Else
Purpose: Used with IF, if not true do these commands
Example: If Exists s:User-Startup
Say "User Startup already exists"
Else
Ed s:User-Startup
Endif
Endcli
Format: Endcli
Purpose: Close CLI console window
Example: Endcli
Endif
Format: Endif
Purpose: End a IF..ELSE..ENDIF block
Example: If $Age GT 65
Say "You are a pensioner!"
Endif
Endskip
Format: Endskip
Purpose: Stops a SKIP branch (for debugging)
Example: Endskip
Eval
Format: Eval Value1/A Op Value2/M To/K LFormat/K
Purpose: Evaluate a simple arithmetic expression
Example: Eval $count + 1 to env:count
Execute
Format: Execute File/A
Purpose: Execute a script or batch file
Example: Execute PCD
Failat
Format: Failat RCLIM/A
Purpose: Change failure limit for scripts (0,5,10,20)
(0 - Ok, 5 - Warn, 10 - Error, 20 - Fail)
Example: Failat 20
Fault
Format: Fault Error/N/M
Purpose: Display error message from a code
Example: Fault 221
"Fault 221: Disk is full"
FF
Format: FF
Purpose: Turns on Fast Fonts
Example: FF
FileNote
Format: Filenote File/A Comment ALL/S QUIET/S
Purpose: Attach a comment to a file (see LIST)
Example: FileNote List.txt "A list of people's names"
Format
Format: Format Device=Drive/K/A Name/K/A OFS/S FFS/S
INTL=INTERNATIONAL/S NOINTL=NOINTERNATIONAL/S
DIRCACHE/S NODIRCACHE/S NOICONS/S QUICK/S
Purpose: Initialises Amiga disks (in System drawer)
Example: Format Drive DF0: Name "Docs" NOICONS FFS
Get
Format: Get Name/A
Purpose: Returns contents of local env variable
Example: Get RC
Getenv
Format: Getenv Name/A
Purpose: Return contents of a global environment variable
Example: Getenv Workbench
Iconx
Format: Iconx
Purpose: Enables a script to be run from Workbench. The script
must have a Project .info file and the Default Tool
set to c:IconX to run it.
Example: Iconx
If
Format: If NOT/S WARN/S ERROR/S FAIL/S EQ/K GT/K GE/K VAL/S EXISTS/K
Purpose: If condition is true execute following commands until
an ELSE or ENDIF occurs.
Example: IF WARN, IF $count GT 10, IF EXISTS C:List
Info
Format: Info Device
Purpose: Displays information about disks
Example: Info DH0:
Install
Format: Install Device/A NOBOOT/S CHECK/S FFS/S
Purpose: Saves a bootblock to a disk. If you have only one drive
type INSTALL ? and swap disks and then type DF0: and
press RETURN to save bootblock.
Example: Install DF0:
IPrefs
Format: IPrefs
Purpose: Initialises preferences files on startup.
Example: IPrefs
Join
Format: Join File/M/A AS=TO/K/A
Purpose: Join two or files together.
Example: Join File1 File2 File3 as FileFull
Lab
Format: Lab Label
Purpose: State a Label to Skip to in a script
Example: Lab PROC2
List
Format: List Dir/M P=PAT/K KEYS/S DATES/S NODATES/S To/K Sub/K
Since/K Upto/K QUICK/S BLOCK/S NOHEAD/S FILES/S DIRS/S
LFORMAT/K ALL/S
Purpose: List file details in a directory
Example: List Workbench: Block Dates Since=01-Jul-00
LoadWB
Format: Loadwb -DEBUG/S DELAY/S CLEANUP/S NEWPATH/S
Purpose: Display workbench screen
Example: LoadWB -Debug
Lock
Format: Lock Drive/A ON/S OFF/S Passkey
Purpose: Lock a device from writing
Example: Lock DH1: GHK459
MagTape
Format: MagTape Device/K Unit/N/K RET=RETENSION/S REW=REWIND/S SKIP/N/K
Purpose: Controls magnetic tape device
Example: Magtape Device TAPE1: Unit 0 REWIND
MakeDir
Format: Makedir Name/M
Purpose: Create one or more new directories.
Example: MakeDir DH1:Docs DH1:Basic DH0:TempFiles
MakeLink
Format: MakeLink From/A To/A HARD/S FORCE/S
Purpose: Creates a logical link between files
Example: MakeLink T C:Type Hard
Mount
Format: Mount Device/M From/K
Purpose: Loads and mount a device
Example: Mount DEVS:CD0
Newcli
Format: Newcli Window From
Purpose: Open a new CLI console (CON) window
Window format: CON:X/Y/Width/Height/Name/Option(s)
Options: Auto,Backdrop,Noborder, Nodrag,Simple,
Smart,Wait,Close
Example: Newcli CON:0/10/400/200/Shell/CLOSE
NewShell
Format: NewShell Window From
Purpose: Open a new Shell console (CON) window
Example: NewShell From S:Shell-Startup
Path
Format: Path Path/M ADD/S SHOW/S RESET/S REMOVE/S QUIET/S
Purpose: Set or change the program search path
Example: Path SC:C Add
Prompt
Format: Prompt Prompt
Purpose: Change the prompt text (Codes: %R = last return code,
%S = Current path, %N = CLI Number)
Example: Prompt "%N.%S> "
Protect
Format: Protect File/A Flags ADD/S SUB/S ALL/S QUIET/S
Purpose: Change the 'rwedsp' flags of a file. (r=read,w=write,
e=execute,d=delete,s=script,p=pure)
Example: Protect Editor rwed
Quit
Format: Quit RC/N
Purpose: Quit a script with optional return code
Example: Quit 5
Relabel
Format: Relabel Drive/A Name/A
Purpose: Change name of a disk
Example: Relabel DF0: "Documents"
RemRAD
Format: RemRAD Device FORCE/S
Purpose: Remove RAD device from memory
Example: RemRAD RAD:
Rename
Format: Rename From/A/M To=As/A QUIET/S
Purpose: Rename or move one or more files
Example: Rename MyDoc as MyDoc.doc
RequestChoice
Format: RequestChoice Title/A Body/A Gadgets/M PubScreen/K
Purpose: Asks for input via a requester
Example: RequestChoice >ENV:RT "Format" "About to format your hard
disk*nAre you sure?" "Go ahead" "No way!"
RequestFile
Format: RequestFile 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
Purpose: Asks for a filename via ASL file requester
Example: RequestFile >ENV:File Title "Select a File" Positive "Load" Noicons
Resident
Format: Resident Name File REMOVE/S ADD/S REPLACE/S PURE=FORCE/S SYSTEM/S
Purpose: Stores AmigaDOS command in memory (quicker then reloading
from disk each time it is executed). To ensure a
command can be made resident check the pure flag (see List).
Example: Resident C:Dir Pure
Run
Format: Run Command/F
Purpose: Execute a program in the background (multi-task)
Example: Run Printfiles Doc1
Search
Format: Search From/M Search/A ALL/S NONUM/S QUIET/S QUICK/S
FILE/S PATTERN/S
Purpose: Search for a string in a file or a file on a disk
Example: Search SYS: "List" File All
Set
Format: Set Name String/F
Purpose: Sets or lists a local environment variable (local to current
shell or current process)
Example: Set MyName "Peter"
SetClock
Format: Setclock LOAD/S SAVE/S RESET/S
Purpose: Load or set the date and time from battery-backed clock
Example: Date 27-Nov-00 10:00, SetClock Save
SetDate
Format: Setdate File/A Weekday Date Time ALL/S
Purpose: Set date of a file or directory (see List)
Example: Setdate DEVS: Monday 10:30
Setenv
Format: Setenv Name String/F
Purpose: Change the contents of a environment variable
Example: Setenv Workbench "3.1"
Setfont
Format: Setfont Name/A Size/N/A SCALE/S PROP/S ITALIC/S
BOLD/S UNDERLINE/S
Purpose: Sets console font
Example: SetFont Courier 15 Bold
SetKeyboard
Format: Setkeyboard Keymap/A
Purpose: Sets keyboard layout using layouts in Devs:Keymaps.
You can use the Input preferences instead.
Example: SetKeyboard USA0
SetMap
Format: SetMap <keymap id>
Purpose: Sets keyboard layout. Deprecated in WB2.
Keymaps include CDN,CH1,CH2,D,DK,E,F,GB,I,IS,N,S,USA0,USA1,USA2.
Keymap can be set in icon using Tooltype: KEYMAP=<map>
Example: Setmap GB
SetPatch
Format: Setpatch QUIET/S NOCACHE/S REVERSE/S NOAGA/S
Purpose: Patch Operating System functions and remove bugs (43.4)
Example: Setpatch Quiet
SetPatch
Format: Setpatch QUIET/S NOCACHE/S REVERSE/S NONSD/S NOAGA/S PATCHCONFIGFILE=PCF/K
PATCHCONFIGLINE=PCL/K PATCHINFO=PI/S FORCEUPDATE/S KILLUPDATE/S NOROMUPDATE/S
DISABLEROMMODULES/S SKIPROMUPDATES=SKIPROMMODULES/K WAITFORVALIDATE/S
AVOIDMEMFKICKFORPATCHES/S
Purpose: Patch Operating System functions, enable/disable rom updates, disable
HD NDS mode, wait for disk validation and remove bugs (44.38)
Example: Setpatch NOROMUPDATE NONSD QUIET
Skip
Format: Skip Label BACK/S
Purpose: Jump to a label in a script (see Lab). Use back if
label occurs before Skip command.
Example: Skip Lab2 Back
Sort
Format: Sort From/A To/A Colstart/K CASE/S NUMERIC/S
Purpose: Sort a file and output to new file
Example: Sort Figures To SortedFigures Numeric
Stack
Format: Stack Size/N
Purpose: Change/display amount of stack space in bytes
Example: Stack 10000
Status
Format: Status Process/N FULL/S TCB/S CLI=ALL/S COM=COMMAND/K
Purpose: Display status of running programs. TCB is Task Control Block
Example: Status 2 Full
Type
Format: Type From/A/M TO/K OPT/K HEX/S NUMBER/S
Purpose: Display contents of text file on screen and binary files using
HEX with optional line numbers.
Example: Type C:DIR HEX
Unset
Format: Unset Name
Purpose: Remove a local env variable
Example: Unset MyName
UnSetEnv
Format: UnSetEnv Name
Purpose: Remove a global env variable
Example: UnSetEnv Workbench
Unalias
Format: Unalias Name
Purpose: Remove a short name for a command
Example: UnAlias MyDir
Version
Format: Version Name Version/N Revision/N FILE/S FULL/S
Unit/N INTERNAL/S RES/S
Purpose: Display workbench, library or device version information
Example: Version kickstart Version=39 Revision=106
Wait
Format: Wait Time/N SEC=SECS/S MIN=MINS/S UNTIL/K
Purpose: Wait for a specified period of time
Example: Wait Until 12:00
Which
Format: Which File/A NORES/S RES/S ALL/S
Purpose: Find where a file is in command path (see Path)
Example: Which Multiview
Why
Format: Why
Purpose: Display reason why a previous command failed
Example: Why
Key
/A Required argument
/F Final argument in list
/K Keyword must be entered with argument
/M Multiple arguments
/N Number
/S Switch (optional)
Additional AmigaDOS commands
DMS
Format:
DMS Read file[.DMS] [FROM dev:] [TEXT filetext] [CMODE mode] [LOW lowtrack] [HIGH hightrack] [NOVAL] [NOZERO] [ENCRYPT password]
DMS Write file[.DMS],,, [TO dev:] [LOW lowtrack] [HIGH hightrack] [NOVAL] [NOTEXT] [NOPAUSE [DECRYPT password]
DMS Repack file[.DMS] [TO dev:] [LOW lowtrack] [HIGH hightrack] [CMODE mode]
DMS View file[.DMS],,, [FULL] DMS Text file[.DMS],,,
DMS Test file[.DMS],,, DMS Help
Purpose: To read, write or view Disk Masher disk images of floppy disks.
Example: DMS Write MyDisk.DMS FROM DF0:
Installer
Format: Installer [SCRIPT] filename <[APPNAME] name> <[MINIUSER] level> <[DEFUSER] default> <[LOGFILE]
logname> <[LANGUAGE] language> <NOPRETEND> <NOLOG> <NOPRINT>
Purpose: To install an application via a installer script. Usually provided as a default tool for script
files in icon.
Example: Installer SCRIPT InstallApp APPNAME MyProgram LOGFILE DH0:MyProgram.log
LHA
Format: LHA [-options] <command> <archive[.LZH|LHA]> [[homedir] <filespec...] [@file] [destination]
Purpose: To create, modify or list LHA or LZH files
Examples:
LHA a pictures.lha #?.jpg (archives all jpg files into pictures.lha)
LHA l pictures.lha (lists all files in pictures.lha)
LHA x pictures.lha (extracts all files from pictures.lha)
LZX
Format: LZX [-options] <command> <archive> [<file> ...] [<destdir>]
Purpose: To create, modify or list LZX archive files.
Examples:
LZX a documents.lzx #?.doc (archives all doc files into documents.lzx)
LZX l documents.lzx (lists all files in documents.lzx)
LZX x documents.lzx (extracts all files from documents.lzx)
Additional AmigaDOS Information
Clear Screen
Example: Echo "*E[0;0H*E[J"
Purpose: Clears the AmigaOS screen. Uses printer commands
to control text formatting in CLI, so *E is equivalent to ESC character.
The command clear is normally defined using an Alias or an AmigaDOS
script in S: folder.
Text in Italics
Example: Echo "*E[3mItalics*E[23m"
Purpose: *E[3m turns on italics and *E[23m turns off italics
Text in Bold
Example: Echo "*E[1mBold*E[22m"
Purpose: *E[1m turns on bold, and *E[22m turns off bold.
Underline Text
Example: Echo "*E[4mUnderline*E[24m"
Purpose: *E[4m turns on underline, and *E24m turns off underline.
Coloured Text
Example: Echo "*E[32mRed Text*E[0m"
Purpose: *E[nm where n=30-39 for foreground color or n=40-49 for background
colour.
*E[0m resets to normal character set.