![]() |
A CMD DOS Primer(last updated 2023-06-05) |
![]() |
From time to time, CMD DOS and JiffyDOS syntax questions come up in the Commodore groups. Here are some examples of the more detailed usages that I've found helpful. Note that many of these are commands for native mode partitions, and can't be used on 1541 / 1571 / 1581 emulation partitions.
For some more detailed information about the CMD hard drives, see Mike Naberezny's excellent web page.
I've also added as many of the original CMD utility disks as I could find in my collection:
"Plus" versions of
the utilities, side A (including WCOPY, FCOPY, MCOPY, &c.)
"Plus" versions of the utilities,
side B (including Menuette, a menu-driven file
explorer for the CMD devices)
The command syntax makes perfect sense if you remember that CMD DOS
is just an extension of standard Commodore DOS, except that the "unit
number" portion of the Commodore syntax (e.g. the 0
in S0:SCRATCHFILE
) is replaced by a partition number
(optionally followed by a directory path). Starting a directory path
with two slashes means that you are specifying the path from the root
of the partition.
Most of these commands can take optional partition number and path parameters. For more information, see the CMD Hard Drive manual, Section 9.
If you have a question or find any errors, please email me (cenbe at protonmail dot com).
CMD/
containing HD-TOOLS.64
, the following commands would give
a FILE NOT FOUND
error:
@#12
@CP21
@CD/CMD
@#11
LOAD"21/CMD/:HD-TOOLS.64",12
The reason is that CMD/
is already the working
directory for partition 21, and you have essentially asked the drive
to switch to /CMD/CMD
. In the example above, this would
happen even if you changed to a different partition on drive 12 before
switching to drive 11 and issuing the command. The correct command
(note the double slash) would be:
LOAD"21//CMD/:HD-TOOLS.64",12
list partitions | @$=P |
change to partition 16 | @CP16 |
rename a partition | @R-P:NEWNAME=OLDNAME |
create a subdirectory (current drive and partition) | @MD:SUBDIR |
create a subdirectory in partition 12 | @MD12:SUBDIR |
create a subdirectory in partition 12, in parent dir PARENT | @MD12//PARENT/:SUBDIR |
remove a subdirectory (as above, must be empty) | @RD:SUBDIR |
rename a subdirectory (from parent directory) | @R0:NEWNAME=OLDNAME |
rename the header of the current subdirectory
(as it appears in the listing) |
@R-H:NEWNAME |
change to subdirectory SUBDIR | @CD//SUBDIR |
change to parent directory
(note that this command does not return an error if you are in the root directory) |
@CD← (back-arrow) |
show program files, or S for sequential files, U for USR files, B for subdirectories ("branches"), etc. |
@$:*=P |
show files in subdirectory SUBDIR of current dir | @$/SUBDIR/:* |
show files in subdirectory //SUBDIR/SUB2
(use if current dir is e.g. //OTHERDIR) |
@$//SUBDIR/SUB2/:*
|
show files in partition 18 | @$18 |
show files in subdirectory SUBDIR/SUB2 of partition 18 | @$18//SUBDIR/SUB2/:* |
show files with timestamps | @$=T |
show files with timestamps (long) | @$=T:*=L |
show files younger than 01/27/08 | @$=T:*=<01/27/08 |
copy FILENAME from partition 1 to partition 2 | @C2//:FILENAME=1//:FILENAME
|
copy FIND from partition 18, dir CMD to partition 16, dir TEMP | @C16//TEMP/:FIND=18//CMD/:FIND |
copy TEST from dir TEMP to dir TEMP2 of current partition | @C//TEMP2/:TEST=//TEMP/:TEST |
Remember: target first, then source. |
@X12
@#8
LOAD"$",8
)
and LIST
itctrl-W
(or ctrl-A
to select all files)RUN
to start copying
@MD:AB/CD
will in fact create a directory named AB/CD
. Trying
to delete it:
@RD:AB/CD
will give a 39,FILE NOT FOUND
error, and wild cards
won't work:
@RD:AB?CD
will give a 30,SYNTAX ERROR
. The only way you can
delete it is to rename it first:
@R0:ABCDE=AB/CD
@RD:ABCDE