Wersting Dir 1.26


Contents


Purpose

Wersting Dir (abbreviated to wDir or D) replaces the normal DOS DIR command for listing directory contents. It provides nearly full compatibility with DIR (no need to relearn), but also adds numerous features that normally requires special applications. As for now, it's quite notably slower than DIR, but this will be fixed in later releases.

Features

Syntax

D.EXE [<files>] [<switches>] [@<configfile>]

These parameters may appear in any order on the command line. Switches are always preceded by a slash, and can be overridden by placing a dash after the slash, e.g. /-D disables a previously set /D. <files> contains a directory and/or file mask for the files you want to display. There are known problems with the parsing of the parameter, so if you have any suggestions about how to do it in a fool-proof way, please tell me about it.

You can save your switches to a file and then use @<configfile> to use those parameters as defaults. Specify this in the WDIRCMD enviroment variable in your AUTOEXEC.BAT. The configuration file is read every time D is executed, so make sure it resides on a fast media. Parameters can also be placed directly in the enviroment variable. You can use this parameter on the command line too, but that's pretty awkward. From version 1.10 and on, you can place your own comments in the configuration file by placing a grid (#) as the first character of a line. The maximum size of the configuration file is 4 kB.

Switches

In alphabetical order

/?

Displays a help screen with a short command reference and color coding guide.

/43

If you're using /SC and running 43 line mode, use this switch to make sure the page breaks are made in the correct places.

/A

Selects which files are to be displayed, regarding their file attributes. You can optionally specify one or many of the following parameters; specifying only /A will display all files, no matter what attributes they may have.

Table 1: Parameters to be used with /A
AFiles with the archive attribute are displayed.
RRead-only files will be displayed.
HHidden files, ditto.
SSystem files, ditto.
DDirectories, ditto.

If you precede the parameter with a dash ("-"), you'll have an opposite effect and display all files except the ones specified.

Example

/AH-R

This will display all files that are hidden, but not any read-only files.

/ARJ

Displays the contents of ARJ archives in the same way as /ZIP, /LZH and /RAR. There is no support for file attributes inside the archives.

/B

Strips all file information except the name and extension and displays one file per row. No header or summary information is displayed.

/BA

Shows how many bytes are allocated for every directory. This is always a multiple of the cluster size. Also, the waste percentage, i.e. how much space is lost due to the clusters, is displayed.

/BMP

Displays the height, width, color depth and any compression algorithm used of all Windows bitmaps (*.BMP, *.RLE). The information is displayed after any attributes if /T is set, but before any long filename.

Example

640x480x256 RLE8

/BW

All color-coding is switched off and everything is displayed in black and white.

/CL:<extension>:<colors>

Allows the user to fully customize the colors used for different extensions. <extension> is of course the extension to effect (however, there are special cases, see below) and <colors> is a list on the form <foreground>[,<background>][,B].

Some extensions are handled differently; files compressed with Microsoft Compress (i.e. has a _* name) are defined with _. To set the default colors for the whole application, use *, use LFN to select the color for long filenames, and finally, use DIR for directories.

Note: Blinking text sometimes displays non-blinking when running the DOS-prompt in a window session under Windows 95. Also, some color combinations only work if you're using /D (as opposed to ANSI colors).

Examples

/CL:DIR:15,2

Display directories as white on green.

/CL::8

Display files without extension as dark gray.

/CL:*:14

Set the default color to yellow.

/CL:TMP:15,4,B

Display temporary files as blinking white on red.

/CLS

Clears the screen before doing anything.

/DA

Periods, as opposed to spaces, are used as placeholders for attributes that aren't set. This switch is not relevant if /T isn't specified.

/DF<s>

Selects the date format to be used, defaults to dd-mm-yy. Allowed format strings are yyyy, yy, mm and dd. No syntax checking is performed, that's up to you.

Example

/DFyyyy.mm.dd

/DIR

Use this switch to ensure complete DIR compatibility, if that's crucial. These are the changes when using /DIR:

Haven't checked so much yet, please report any incompatibilities you'll find to me. If not fixed, they'll at least be documented.

/F50

Forces the screen into 50 line mode (43 lines for EGA screens). Automatically pauses before going back to the previous video mode.

/FLIC

Displays the width, height, color depth and number of frames for Autodesk animations (*.FLI and *.FLC). Width, height and color depth is always 320x200x256 for FLI files, though.

/GIF

The width, height, color depth and version of Compuserve GIF images is displayed.

Example

640x480x256 GIF89a Intr

This is a 640x480 256 color interlaced GIF89a bitmap.

/I

If you think the . and .. directories just fill your screen without reason, this might be useful. The switch takes one ore more parameters:

Table 2: Parameters to use with /I
LIgnores them in the directory listing
SIgnores them in the summary

You may specify them both if you like. The default is to ignore them in the summary.

/JPG

Displays the width and height of JPEG (*.JPG) files. Color depth isn't relevant, all JPEGs are 24 bit.

/L

All filenames (though not long filenames) are converted to lower-case. Any letters above ASCII 127 are not affected.

/LFN

The long filenames introduced in Windows 95 are displayed in the colors specified for 'LFN' (see color coding) last on the line. If the name won't fit on the line and if you're using direct display write (with /D), it will completely move on to the next line (i.e. LFNs aren't wrapped). For the long filesnames to work, you must be running in Windows 95 GUI mode, thus it will not work if you're running in plain MS-DOS mode.

/LWN

Provides the same functionality as /LFN, except that it only displays the long filename when it differs from the standard name. It's case-sensitive, if the original name is 'WIN.INI', the long filename will be shown if it is 'win.ini'. This switch will eliminate screen clutter caused by all LFNs.

/LZH

This switch will display the contents of LZH archives (created by LHA). As with all archives, the contents is indented.

/NIC

When archives (ZIP, LZH and RAR) are found in a directory, the first bytes of the file are checked to see if it really is a valid archive. If you're DIRing a diskette, this might take a while. /NIC (No Integrity Check) will prevent this from happening. If the archive is recognized, the file will be displayed in color color chosen for that extension, if not the default colors will be used. See color coding.

/NOWARN

No warnings will be issued with this switch set. These are the occasions when warnings will occur:

/O

Selects sord order to use, and can be one or more (can only be more than one if G is specified) of the following:

Table 3: Parameters to use with /O
GGroups the directories together in the beginning of the listing.
NSorts ascending (A-Z) by name.
EDitto by extension.
DDitto by date, oldest first.
SDitto, by size, smallest first.

By preceding a letter with a dash ("-"), the sort order will be reversed to descending.

/P

The output will be paused for every screen and a key must be pressed to continue.

/PCX

Displays the width, height and color depth of ZSoft PCX files.

/RAR

This switch will display the contents of RAR archives.

RDX[<c>]

Selects the thousand delimiter to use for file sizes. If this parameter is omitted, a space will be the delimiter.

/S

All subdirectories to the directory to be displayed will be recursed before displaying any output. A summary of all files found in all directories will be displayed at the end of the listing.

/SC

Screen compatibility. On some systems, the number of lines is for some reason not correctly detected, 25 lines is assumed even when running 43/50 line mode. /SC uses another method to detect the line count. The catch is that it cannot distinguish between 43 and 50 lines. Use /43 is you're running 43 line mode.

/SN

This will display the serial number of the drive you're listing.

/T

The attribute(s) of the file will be displayed after the time stamp. The attributes are by default separated by spaces, but can be separated by dots/periods with the /DA switch.

/TF<s>

Selects the time format to be used, defaults to 12hr hh:mm. Allowed format strings are hh, mm and ss and p. Specifying p will use 12hr mode and insert pm/am at that point. No syntax checking is performed, that's up to you.

Example

/TFhh:mm.ssp

/TGA

Displays width, height and color depth of TrueVision TGA images (*.TGA) in the same manner as all other image files.

/W

Only the filename and extension will be displayed in five columns. Directories are displayed in brackets ([like this]) to clearify.

/WAV

Displays the sample rate in kHz and bit count for Windows Wave Sound (*.WAV).

/ZIP

This switch will display the contents of ZIP archives. If the ZIP is too large, you are warned about this and the rest of the archive is skipped. In the summary, you will be informed how many of the files were displayed and the total file count. Normally, about 1000 files will display without memory problems.

WDIRCMD enviroment variable

To make D easier to customize, you may use the WDIRCMD enviroment variable to set default switches. It works in the same way as the standard DIRCMD variable for DIR. DIRCMD is checked by D, too. This is the order in which the parameters get parsed:

  1. DIRCMD enviroment variable
  2. WDIRCMD enviroment variable
  3. Any configuration file specified in WDIRCMD
  4. The command line
  5. Any configuration file specified on the command line

The probably best thing to do is to specify a configuration file in WDIRCMD. That way, you don't have to reboot to change the default behaviour. However, with this approach, the config file will be opened and read every time you call D, so make sure it resides on a fast drive.

Color coding

The colors used to mark different extensions is fully customizable with the /CL switch. These colors can be used:

Table 4: Colors and their corresponding numbers
NumberColor
0Black
1Blue
2Green
3Cyan
4Red
5Magenta
6Brown
7Light gray
8Dark gray
9Light blue
10Light green
11Light cyan
12Light red
13Light magenta
14Yellow
15White

Note: Colors 8-15 can only be used as foreground colors.

Version history

1.26 (July 1st 1997)

1.25 (June 6th 1997)

1.20b (January 25th 1997)

1.20a (December 12th 1996)

1.20 (December 6th 1996)

1.10c (October 17th 1996)

1.10b (September 4th 1996)

1.10a (August 5th 1996)

1.10 (July 31st 1996)

1.00a (June 19th 1996)

1.00 (May 19th 1996)

0.99e (April 24th 1996)

0.99d (March 28th 1996)

0.99c (March 3rd 1996)

0.99b (March 2nd 1996)

0.99a (February 20th 1996)

0.99 (February 6th 1996)

The first release.

Lacking features

Nothing's even close to perfect. These features will (hopefully) be added to Wersting Dir:

I'm not planning to include these features:

A Win32 is under development. It will basically be a direct port without many new features. This is mostly because wDir performs very poorly under Windows NT, e.g. long filenames won't work.

What users say

"Instead of typing 'DIR,' try 'D' instead--you'll like what you see."

ZDNet Software Library

"...'D' is the finest and most useful piece of software I have ever used, and you can can damn-well quote me on that!"

Mister Llama

Acknowledgements

Download

If you want to put Wersting Dir up on your FTP site let me know and I'll include your site to the list. If you want any updates made to wDir announced by e-mail, fill out the form below.

Mailinglist

A mailinglist for Wersting Dir has been set up. The list is one-way and will be used for announcements of new releases.

E-mail:

Notes on distribution

Wersting Dir is freeware and may be freely distributed on any electronic media as long as nothing is charged for it, except for nominal copying costs. If you upload it to an FTP och WWW site or some other service, such as BBSes (which I do encourage), I would appreciate if you would notify me.


RXML parse error: This tag doesn't handle content.
 | <insert file="/~magnus/footer-eng-html-4.0.html" nocache="nocache">