DIRT Version 1.0 Copyright 1990 Charles K. Hughes* This is the version 1.0 release of DIRT - a new directory lister for SpartaDOS. Though meant specifically for 4.0+ it will work with any version of SpartaDOS except for 1.1. DIRT will give a listing of files similar to the standard DIR command in SpartaDOS, however, instead of giving the time a file was created, it gives a listing of the attributes for that file. Why use DIRT? Well, it is faster, shows the attributes, and is better than the standard DIR command in two ways. The first way is with regard to very large files - DIRT will show the full 8 bytes of file size (files can be up to 16,000,000 bytes long) where the normal DIR command only shows the lower 6 bytes of file size (any file greater than 999,999 bytes will have the upper digits truncated). The second benefit is that DIRT can be told to NOT display certain files, regardless of their attributes. The standard form of the command is: DIRT [+|-phasd] [!] [] The options are used as follows: [+|-phasd] This option is used to specify the attributes of the files you wish to see. If you start the option with a '+' then ONLY those files that match the filename mask and have the attribute(s) specified will be listed. If you start the option with a '-' then ALL the files that match the filename mask EXCEPT those with the specified attribute(s) set will be listed. This option must appear before the path and filename. The letters refer to the following attributes: p - protected, bit 0 of the status byte. h - hidden, bit 1 of status byte. a - archived, bit 2 of the status byte. s - subdirectory, bit 5 of the status byte. d - defragmented, bit 6 of the status byte. (see note at end) [!] This is the NOT option and it tells DIRT to show only those files that DO NOT match the filename mask. This option can be placed anywhere on the command line, even inside the other options. [Dx:] or [D:] This option selects the drive. If the Dx: format is used, x is the drive looked at. If the D: format is used then the default drive is looked at, EXCEPT under SDX. [A-I:] or [1-9:] or [Da:] This option is valid only under SDX and is used instead of the drive options above. Regardless of the option, the drive (if given) must end with a colon or the results will be unpredicatable. If no drive specifier is given then the default drive is used. [pathname] The pathname must immediately follow the drive (if any). The pathname must be a valid pathname and end with a \, < or >. If no pathname is given then the current path is assumed. REMEMBER: Under SDX << and >> are not valid in a pathname. [filename mask] The filename mask must immediately follow the pathname or the drive specifier if either is given. The mask can be any combination of wildcards and valid filename characters. If no filename mask is given, then *.* is assumed. NOTE: There must be a space between 'DIRT' and any options in order for SpartaDOS to recognize the DIRT command. Likewise, there must be a space between the attribute option and the drive/pathname/mask option. The exclamation option can be placed anywhere and does not need to be set off by spaces. The filename and options can be in upper, lower, or mixed case, DIRT doesn't care because it makes them all upper case before reading them. DIRT also ignores extra spaces between options EXCEPT there can be no spaces embedded in or between the drive, path, and filename. The source code is included with this file. It is in MAC65 format and well commented (though not commented well :) so feel free to look through it. Anyone who wishes to modify it is free to do so but if you wish to distribute the modified version you can only do so under these conditions: 1) You must distribute the modified source code with the object code. 2) You must give proper credit (to me and previous authors if any). 3) You cannot sell the program though a small fee (less than $5) may be charged for copying & distribution. [Anyone who wishes to sell the program may contact me via the address below.] 4) You must include this same set of conditions in your distribution. ADVANCED USERS NOTE: The defragmentation bit doesn't officially exist but bit 6 of the status byte is unused by SpartaDOS so I decided that was the best way to keep track of a file that is not fragmented. This is of no particular value to DIRT, but is very important to the defragmentation program that I am working on. This bit is only valid as long as the file is not modified after being defragmented. In addition, SpartaDOS may zero this flag but is unlikely to set it. If you feel this utility is something you could never live without, and have a burning desire to lighten your load and enrich the author, please feel free to send some of that green stuff burning a hole in your pocket [plutonium is perfectly acceptable :) ]. If you have any questions or comments I can be reached at: BOB PUFFS BBS (716) 247-8355 CLOSER TO HOME BBS (419) 368-4413 ATARI BASE BBS (408) 745-5306 BAAUG BBS (408) 986-0215 PORTAL BB$ (408) 725-0561 Usenet: Ordania-DM@cup.portal.com or Charles_Hughes@cup.portal.com Or USnail: Charles Hughes 555 E. Washington Ave. #301 Sunnyvale, CA 94086 Phone: (408) 732-7749 * All rights reserved. This text may be freely distributed under the following conditions - the text is not modified, no charge other than a nominal copying fee is imposed, and if used in a printed or online publication a copy of said publication be sent to the author's address given above. Commercial non-Atari-user-group publications must get specific written permission from the author in order to use this material. In other words, if your publication isn't directly affiliated with an Atari User Group, I reserve the right to charge you for printing my material. Atari specific online publications are exempt from this requirement (Zmag, STReport, etc).