Commodore DOS - DOS Commands

DOS Commands

Command Description BASIC 1.x and 2.x Implementation DOS Wedge Implementation BASIC 3.0+ Implementation
New
Format a disk, preparing it for use and deleting any data contained on it. Omitting the two-character identifier parameter will perform a quick deletion of all files on an already-formatted disk.
OPEN 15,8,15,"N0:disk name,identifier":CLOSE 15 @N0:disk name,identifier HEADER "disk name",Iidentifier
Scratch
Delete a file from the disk (or multiple files, using wild card matching)
OPEN 15,8,15,"S0:file name":CLOSE 15 @S0:file name SCRATCH "file name"
Rename
Rename a file on the disk. Note that the new name comes first (except in the BASIC 3.0+ code)!
OPEN 15,8,15,"R0:new name=old name":CLOSE 15 @R0:new name=old name RENAME "old name" TO "new name"
Initialize
Reset the drive and read the disk BAM into its internal memory. Rarely needed as the drive usually does this on its own, except if a disk is exchanged for another one with the same ID.
OPEN 15,8,15,"I0:":CLOSE 15 @I0: DCLEAR (BASIC 7.0+ only)
Validate
Reconcile the BAM with the disk directory, allocate all used blocks and free all blocks not being used by files, and delete all unclosed files from the directory. Comparable to CHKDSK/ScanDisk tools of Microsoft operating systems.
OPEN 15,8,15,"V0:":CLOSE 15 @V0: COLLECT
Copy
Duplicate a file on the same disk (or another disk in the same two-drive unit) under a different file name. Note that the new name comes first (except in the BASIC 3.0+ code)! Duplicating to another disk without a two-drive unit requires using a utility program.
OPEN 15,8,15,"C0:new name=0:existing name":CLOSE 15 @C0:new name=0:existing name COPY"existing name"TO"new name"
Duplicate
Duplicate an entire disk. Only available in two-drive units, otherwise a utility program needs to be used instead. The target(!) drive number comes first, then the source drive number (except in the BASIC 3.0+ code).
OPEN 15,8,15,"D1=0":CLOSE 15 @D1=0 BACKUP D0 TO D1

There are also a command for seeking in RELative type files (RECORD#), several block-level direct-access commands (BLOCK-READ, BLOCK-WRITE, BUFFER-POINTER), block management (BLOCK-ALLOCATE, BLOCK-FREE), drive memory manipulation and execution of program code on the drive's processor (MEMORY-WRITE, MEMORY-READ, MEMORY-EXECUTE, BLOCK-EXECUTE) and user-definable functions (USER and & commands). Some of the theoretically user-definable functions were rededicated for accessing new functionality in DOS versions after 1.0.

Read more about this topic:  Commodore DOS

Famous quotes containing the words dos and/or commands:

    In abnormal times like our own, when institutions are changing rapidly in several directions at once and the traditional framework of society has broken down, it becomes more and more difficult to measure any type of behavior against any other.
    —John Dos Passos (1896–1970)

    The power of a text is different when it is read from when it is copied out.... Only the copied text thus commands the soul of him who is occupied with it, whereas the mere reader never discovers the new aspects of his inner self that are opened by the text, that road cut through the interior jungle forever closing behind it: because the reader follows the movement of his mind in the free flight of day-dreaming, whereas the copier submits it to command.
    Walter Benjamin (1892–1940)