(HS) D.EXE - Version 1.69 - By Hafthor Stefansson
*** 10th Anniversary Edition ***

© Copyright 2000 - All Rights Reserved
Made Using QuickAssembler™/QuickC™ v2.51, Runtime by Microsoft®


Copyright / Legal Agreement


Description

It's really nothing spectacular. It's just a directory program that has evolved into something that I, and a few friends, have become dependant on.


Usage

99% of the time, it's just D. But occasionally you'll want something different. First of all you can give D a drive, path, and/or filename or mask. This is done in the same manner as you would do for DIR.

Example:    D  A:\DOC\*.TXT
Displays all the files with the TXT extension in the DOC directory on the A drive.

Additionally, you can give multiple file specifications, including other masks, directories and/or drives.

Example:    D  *.TXT  *.DOC
Displays all the files with the TXT or DOC extension in the default directory.

Additional file specifications are based from the prior file specification.

Example:    D  \  LANG\*.TXT  QC251\*.EXE

Shows the following:

Note that only drive space data (bytes total, bytes free) are shown for the first drive specified.


Switches

There are a number of options for D which are specified through command line switches. These switches are preceded by a - or a / and are compoundable.

You can have anywhere from 2 to 6 columns. The 2 column one is the most descriptive and shows the filename, size, date and time. This is the initial D setting. The 3 column one just shows the filename and size. The 4 column option gives the filename, and the file size. All the formats that show size automatically use kilobytes, megabytes or gigabytes if the size is too big. The 5 and 6 column options just show the filename.

Example: D /4

Displays the current directory in the four column mode. See below:

There are a series of options that are simply on or off. If the option is specified, it does the opposite of what it would have done without that option being specified. In other words, if D normally shows your directory sorted, the /Q option would cause D to show the directory unsorted.

Option Description Initial Setting
/R Read-only files displayed in a different color (red) + (on)
/S Show system/hidden files (in yellow) + (on)
/V Show volume labels (green. only appear in the root directory) + (on)
/D Show current <.> and parent <..> directories (white) - (off)
/Q Sort directory (Why Q? Hmmm... Quicksort, maybe?)  See /K switch for more info on sorting. + (on)
/O Sort order (+=ascending, -=descending) + (on)
/P Presort by file type (Volume labels, Hidden/system files, Directories, read-only files (if in different color, see /R), then just regular files.) + (on)
/T Background subdirectory totaling - (off)

Additionally, you may add a + or - to the option to force it on or off. /Q+ would force D to always show the directory sorted, no matter what it was configured for. Normally, this would be useful in batch files where the present configuration of D may not be known.

/T is quite handy if you want to quickly find out which directories are chewing up all the hard disk space. Just go to the root directory and type D /T. Where you used to see <DIR>, you'll instead see how much space all the files in that directory take up, including the subdirectories beyond. This number does not include file slack -- only the total of all the file lengths. You can also press Alt+T while D is running to do this as well. Note that the directory displays before the subdirectories are totaled, which happens as a background task.

As mentioned above, D can sort the directory. The /K option allows you to select what D sorts the directory display by.

Option Description
/KF Sort by filename (then by extension, this is the initial D setting)
/KE Sort by extension (then by filename)
/KS Sort by size (then by filename, extension)
/KD Sort by date, time (then by filename, extension)

Sample: Made by D /T /KS

Since D can show dates and times, and since I'd like to believe that it has international appeal, several date and time formats are available. Note that invalid dates (such as 15-31-2107) and/or times (such as 31:63:62) are flagged with bright magenta. Many date/time errors are a result of the seconds being above maximum, so you may have to use the /I! switch to see the actual problem.

Option Date Format Time Format Sample
/I0* U.S. Mo-Dy-Yr 12Hr:Mn a/p  4-01-94 12:00a
/I1 --""-- 24Hr:Mn  4-01-94  00:00
/I2 U.S. Month Dy-Yr 12Hr:Mn a/p Apr01-94 12:00a
/I3 --""-- 24Hr:Mn Apr 01-94 00:00
/I4 Euro. Dy-Mo-Yr 12Hr:Mn a/p 01-04-94 12:00a
/I5 --""-- 24Hr:Mn 01-04-94  00:00
/I6 Euro. Dy-Month-Yr 12Hr:Mn a/p 01-Apr94 12:00a
/I7 --""-- 24Hr:Mn 01-Apr-94 00:00
/I8 Jap. Yr-Mo-Dy 12Hr:Mn a/p 94-04-01 12:00a
/I9 --""-- 24Hr:Mn 94-04-01  00:00
/I! Full. YearMoDy 24HrMnSc 19940401 000000

* /I0 is D's initial setting.

You can also have D reset the video mode before displaying the directory.

Option Description
/M Display the directory in the current video mode. (Initial D setting)
/M+ Force to 80x25 color before displaying.
/M- Force to 80x25 black/white before displaying.

 


Stored Configuration

If you add to any of the above options a C, D will store that option to be used by default.

Example:    D /C3T+

Permanently configures D to show 3 column directories with subdirectory totaling by default. (of course, you can still override any defaults)

Anytime you use the /C switch (even by itself), D will only configure itself and show the current config. It won't do anything else.

Example:    D /C

Shows current configuration. See below:

Something to note is that D.EXE holds its own configuration. There is no other file used. The way it is stored inside the exe file, unfortunately, makes the program un-PKLite-able. Well, sorta. You can set your favorite config, then PKLite it. Try to change the config after compression, and D will fail to find the configuration area in the EXE file.


More Switches

D has two more options that are not permanently configurable.

Option Description
/F Shows only files (no subdirectories are shown)
/U Force to interactive mode, even if only one page

 


Keys

If the directory has more files than can fit on one page, or if the /U command line switch was used, D will pause. Various keys can be pressed to do different things here. These keys also work during background subdirectory totaling (/T).

D Key Action Taken
Escape quit D
Enter next page
Space --""--
F1 Help
PgDn next page
PgUp previous page
Up scroll up one file
Down scroll down one file
Home go to the first page
End go to the last page, but display as many as possible
Alt+2 Switch to 2 column mode
Alt+3 Switch to 3 column mode
Alt+4 Switch to 4 column mode
Alt+5 Switch to 5 column mode
Alt+6 Switch to 6 column mode
Alt+Q Toggle sorting on/off
Alt+K Cycle through sort modes (name, ext, size, date)
Alt+P Toggle presorting on/off
Alt+O Toggle order ascending/descending
Alt+I Cycle through date formats (see /I switch)
Alt+W Write current directory view to a file (D!FILLST.TXT)
Alt+T Total up subdirectories

Pressing any other key will cause D to abort without flushing that key out of the keyboard buffer. This is mainly so if you press D in a big directory out of nervous habit (like I do), and then just start typing the next command, you won't look up to find yourself stuck in D, or with the first letter of your command missing.

All the D keys, except F1, SPACE, ENTER, and ESC are navigation keys. If you use any of the navigation keys, D will not automatically end when the last page of the directory is displayed. If you just use just ENTER, SPACE and ESC, D will return you to the command line after showing you the last page, so you won't be able to go back using the PGUP key or change display or sort modes. (Unless you use the /U switch)

Something to note on the Alt+W key is that it always appends to a file called D!FILLST.TXT in your current directory, which is not necessarily the directory you are viewing. This was done primarily to avoid read-only media problems, like CD-ROMs. To get a file that has the contents of a CD-ROM, you can just switch to the C: drive and type D D:, for example. Then, pressing Alt+W will write to the C
drive. Something else to note is that Alt+W writes out the directory with the same sort and date format settings as are on-screen.


Support

Sorry, there is no support. Hey, what do you expect from what is usually a free program? If you have questions, comments, suggestions, or bug information, you may send them to hafthor@usa.net and I will look it over, but I can not promise you a response, but I certainly will read it and take it under advisement.


About the Author

Q: Hafthor Stefansson?!? How do you pronounce that?
A: H(ah)F'  THOR
(ah like in fAther, THOR as in Thor's hammer)

STEF'  eNS  SON
(STEF like it's spelled, not like Steve, but like Stephanie)
Q: Where does a name like that come from?
A: Reykjavík, Iceland
Q: Iceland, isn't that near Alaska?
A: No. It's pretty much directly north of the U.K.
Q: How do I contact this Hafthor Stefansson person?
A: hafthor@usa.net on the Internet. Currently, I'm living in Chandler Arizona, but who knows for how long. The e-mail address should stay the same.
Q: The legal stuff says I can't use D in my business without a license. How much does a license cost?
A: Depends. Rather than having a hugely complex, unreadable and possibly not-all-inclusive legal statement, I'd rather just have biz and gov ask for it. There are certain biz and gov offices that I may not be able to grant license for at all, others may be granted free license. It just depends.

Harry Browne, Libertarian for President