Displaying Contents of the SD Card

The DIR command in Disk Basic has been extended under SDC-DOS to allow the contents of the SD card to be examined.  The simplest form allows you to list all files and directories that are contained in the SD card's current directory by suffixing the DIR command with a hyphen (-).

  DIR -
IMPORTANT!
The firmware in the CoCo SDC does not currently support long file names. Only those files and directories which conform to the older 8.3 naming conventions will be displayed by the DIR command.
 If you want to display the contents of a sub-directory within the current directory or restrict the listing to items that match a wildcard pattern then you can omit the hyphen and provide a string argument instead. For example, the following command would list all files having an .SDF extension located in the sub-directory named GAMES:

   DIR "GAMES/*.SDF

To list the entire contents of a sub-directory wihout filtering you provide the path name of the directory, including the final slash, but without any wildcard pattern:

   DIR "GAMES/


Information displayed by the DIR command for each item is presented as 4 columns; Name, Extension, Lock Status and Size.

   CASINO   DSK  -  157K
   EGYPT    SDF  -  228K
   GAMEPAK1 DSK  L  157K
   GAMEPAK2 DSK  -  157K
   GR2K          -  <DIR>

When an L appears in the third column instead of a hyphen (-), it indicates that the file is locked. A locked disk image may still be mounted, but you cannot make changes to its contents. Any attempt to use commands such as SAVE or KILL on a locked image will result in a ?WP ERROR.

For files, the fourth column displays the size of the file in kilobytes. For directories, the fourth column simply displays <DIR>.


Changing the Current Directory


At startup, the system normally sets the SD card's current directory to be the root directory. This behaviour can be modified by utilizing a Startup Configuration file. You can also change the current directory from within SDC-DOS by entering a command like the following:

   DIR = "COCO/GAMES/ARCADE

The path name specified in the command is relative to the current directory at the time the command is issued. You can use a path component of ".." to move up one posistion in the directory heirarchy:

   DIR = "../ADVENT

A path name in which the first character is a slash (/) represents an absolute path (i.e. starting from the root directory):

   DIR = "/OS9
   DIR = "/