SpartaDOS X Reference Manual |
The Command Processor — Commands |
DIR (Directory) Command & DIRS (Short Directory) Command |
Purpose |
Lists either all the directory entries, or only those matching a specified filespec. DIR will optionally give you a count of files listed. |
|||||||||||||
Syntax | DIR [+A|H|P|S] [-A|H|P|S] [d:][path][fname][.ext] [/PC] DIRS [+A|H|P|S] [-A|H|P|S] [d:][path][fname][.ext] [/PC] |
|||||||||||||
Type | Internal |
|||||||||||||
Related | ATR,
FIND, MENU,
PATH, PAUSE,
PROMPT |
|||||||||||||
Remarks |
DIR displays the SpartaDOS file directory showing filename, extension, file size in bytes, date, and time created. It also shows a <DIR> in the size field when it sees a subdirectory, displays the Volume and Directory name at the top of the listing, and shows the Free Sectors count at the end of the listing. If you include a "/P" parameter, the DIR command will wait for a key press after displaying each directory screen (23 lines). The "/C" parameter will give a count of the number of entries displayed in that directory. When reading an Atari DOS 2 type diskette, the date and time are omitted for obvious reasons and the file size is roughly converted to bytes. (Atari DOS 2 and clones use sector lengths instead of bytes in the directories so this can not be an exact file size representation.) All AtariDOS 2 type diskettes will have a volume name of "AtariDOS" and a directory name of "ROOT". You may specify the attributes of the files you wish to display, for example DIR +S will display only subdirectories. Note that the default directory attributes (no attributes specified) is "-H' (do not show hidden files). If you wish to see all files (including hidden files), simply enter DIR + Using a '+' with no attribute listed will match all files, regardless of attribute. This will work with any command that allows attribute selection. The DIRS command has exactly the same syntax, but it displays the directory in Atari DOS 2 "compatibility mode" — with no time/date, and with the file size displayed in sectors rather than in bytes. Since the Free Sectors count in DIRS is limited to three digits, the maximum size displayed will always be 999. It also displays the "protected" status (+P) as "*" before each protected filename. The attributes are as follows:
If you do not specify a filespec, "*.*" is assumed as in the following examples: DIR MYSUB> Note that you must follow a subdirectory with a ">" or "\" character if you wish to see the contents of that directory. |
Previous page |