================================================================= XD : eXtended Directory J R Ferguson - version 3.0M, 29 Nov 1996 ================================================================= XD.COM is an 'eXtended Directory' utility that replaced the DOS commands DIR, DEL and ATTRIB. The program is written in Intel 8086/8088 assembler language, to be compiled with Borland Turbo Assembler version 1.0 or higher. Command format XD [filespec] [option(s)] [...] -------------- with filespec [dn:][dirpath][filename][.ext] Wildcards * and ? are allowed Default dn: current drive dirpath current path filename.ext *.* options: /? +? -? : display help /* +* -* : show hidden files /D +D -D : show directory names only /W +W -W : wait for Return when screen is full /E +E -E : sort on file extension /L +L -L : sort on file length /T +T -T : sort on timestamp (date + time) /1 +1 -1 : single column display /2 +2 -2 : two column display /P +P -P : printer echo /F +F -F : printer echo plus form feed /R +R : set read only attribute -R : reset read only attribute /H +H : set hidden attribute -H : reset hidden attribute /S +S : set system attribute -S : reset system attribute /A +A : set archive attribute -A : reset archive attribute /Z +Z -Z : zap (delete) file(s) /Y +Y -Y : yes: process all files Several option characters may be combined after a single option profix character ('/', '+' or '-'), as in /2* or +RHS. More examples follow. Help display ------------ /? +? -? The /? option triggers a summary display of commands and options. This help function is also triggered when a command error is made. Directory display ----------------- If no options are given, the program will display a 4 column wide file overview, excluding hidden files and subdirectories, sorted on filename.ext. The file sizes are also displayed, but not the file date and time. /* +* -* The '*' option triggers the display of hidden files, shown between parentheses, as well as non-hidden files. /D +D -D Issuing the 'D' option results in an an overview of only subdirecory names, but no other files. /1 +1 -1 Option '1' results in a single column display, showing not only the file sizes but also the file date and time for each file. /2 +2 -2 Option '2' results in a two column display, showing not only the file sizes but also the file date and time for each file. /E +E -E With option 'E' the file overview is sorted on file extent and on file name within extent. /L +L -L With option 'L' the file overview is sorted on file size and then filename.ext. Althoug file sizes are displayed in kilobytes, sorting is done with byte precision. /T +T -T With option 'T' the overview is sorted on timestamp (file date and time) and then filename.ext. /P +P -P Option 'P' results in an echo of the display to the PRN printer device. /F +F -F Option 'F' also results in a printer echo, but sends a form feed character to the printer after the last line of information. /W +W -W The 'W' option has the effect that the information cannot scroll off the screen. After each screen page the program displays the text 'CR:' and waits until the Carriage Return key is pressed before displaying any more lines. If this option is combined with the 'P' or 'F' option, the 'CR:' line is not echoed to the printer. Options may be combined in a single command. You may omit the intervening option prefix characters and spaces. Only the first option has to be prefixed by at least one space and one of the three option prefix characters ('/','+' or '-'). The order in which the options are specified is not significant. If, for instance, you want an overview of all .BAS files, including those that have the hidden attribute set, you can give any of the following commands: XD *.BAS /* /P /1 XD *.BAS /* P 1 XD *.BAS /*P1 XD *.BAS -1P -* the following commands, however, are not allowed: XD *.BAS/*1P (no space between file specification and /) XD *.BAS //*P1 (double / option prefix) In the directory listing the files are displayed in one of the following display formats: FORMAT ATTRIBUTES filename.ext nnnnk -H -R filename:ext nnnnk -H +R (filename.ext)nnnnk +H -R (filename:ext)nnnnk +H +R where nnnn = file size in kilobyte In single or double column display the letter S is appended for files that have the system attribute set, and the letter A for files that have the archive attribute set. Also the file date and time are displayed. At the end of the directory listing a summary is displayed, showing the number of files displayed, the total size of those files in kilobyte, the free disk space in kilobyte and, in parethesis, the free disk space as a percentage of the total disk capacity. Command options --------------- /R +R Sets the 'read only' attributes of the files, protecting them from being deleted or overwritten. In the directory listing of XD these files can be recognized by the fact that the '.' between filename and extension is replaced by ':'. -R Resets the 'read only' attributes. /H +H Sets the 'hidden' attribute. Files with the hidden attribute are no longer shown by XD, unless you explicitly ask for it by issuing the '*' command option. In the latter case the hidden files are shown in a pair of surrounding parentheses. -H Resets the 'hidden' file attribute. /S +S Sets the 'system' attribute. In the XD listing in one or two column format these files can be recognized by the letter S following the file size. -S Resets the 'system' file attribute. /A +A Sets the 'archive' attribute. In the one and two column display formats of XD a letter A, following the file size, is show for files that have the 'archive' attribute. This attribute is meant for backup purposes. Saving or copying a file automatically sets its archive attribute, and backup programs normally reset it after the the file is successfully backed up. -A Resets the 'archive' file attribute. Z Zap (erase) the specified file or files. The command options are meant to change the directory entries. Whenever one or more of these options are provided, 'hidden' files will be processed as well. In other words, any command option implies the '*' display option. When a command option is specified, the files matching the file specification are shown one by one on separate lines, followed by a prompt asking you to confirm, skip that file, abort altogether or proceed with this file and all others without further prompting. The choices are: Y (Yes) Process the command for this file. N (No) Skip this command for the current file. A (All) Process this file and any further file that matches the specified file specification without further confirmation. You may stop the processing by pressing Control-X. X (eXit) Stop any further processing of this command. Automatic command processing ---------------------------- /Y +Y -Y With the 'Y' (Yes) command option the prompting mechanism is bypassed altogether, so all specified commands will be processed on all matching files without waiting for confirmation. The effect is the same as if you pressed 'A' after the first prompt. Examples -------- XD /? Displays a command summary. XD Displays a 4-clomun wide directory listing of all non-hidden files in the current directory. XD /P Same as before, with printer echo. XD /P1 Same as before, displaying in single column format. XD /F1 Same as before, but adding a formfeed character. XD A: Displays all non-hidden files in the current directory of the volume in drive A:. XD /* Displays all files (also those that have the 'hidden' file attribute) in the current directory. XD /*T Same as above, but sorted on file date and time. XD \*.* /* Displays all files (also hidden files) in the root directory. XD B:\ /*1 Same for drive B:, using single column display format. XD *.EXE Displays all files with .EXE extension in the current directory. XD TEST.* +R Makes all files having a filename TEST and any file extension 'read-only'. XD TEST.* /R Same as above. XD TEST.* -R Like before, but making them write-enabled. XD TEST /-RY Same as above, without asking. XD -A Resets the archive attribute for all files in the current directory. XD A: +A Sets the archive attribute for all files in the current directory of the volume in drive A:. XD *.TMP /Z Deletes all files with the extension .TMP in the current directory, prompting for confirmation. XD *.TMP -R /Z Same as above, first resetting any 'read only' attributes. XD *.TMP -R/Z Same as above. XD *.TMP -RZ Same as above. XD *.TMP -RZY Same as above, without asking for confirmation. XD WS*.OVR +RH Sets both the 'read only' an the 'hidden' attributes for all files in the current directory that match the filename and extension pattern WS*.OVR.