[Wersting] D[ir] v1.20a Copyright (C) 1995, 1996 Magnus Bäck http://www.geocities.com/SiliconValley/5159 baeck@swipnet.se --------------------------------------------------------------------------- This document contains all you need to know about D, the most compatible DIR replacement. [Wersting] D[ir] is freeware and may be freely distributed on any electronic media as long as nothing is charged for it, except for copying costs. --------------------------------------------------------------------------- Syntax D.EXE [] [] [@] These parameters may appear in any order on the command line. Switches are always preceded by a slash, "/". 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 [@] 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. 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 Previously used to tell D that you were running on a 43 line display but is ignored from version 0.99d and on. /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. A Files with the archive attribute are displayed. R Read-only files will be displayed H Hidden files, ditto S System files, ditto D Directories, 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 if they're read-only. /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, everything is displayed in black and white. /CLS Clears the screen before doing anything. /D Enables direct video memory writes. Improves performance but disables all redirections. /DA Attributes are separated with dots/periods instead of spaces. This switch is not relavant if /T isn't specified. /DF 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 compatability, if that's crutial. These are the changes when using /DIR: * Doing a 'D WIN' normally translates to 'D WIN.', but becomes 'D WIN.*' (unless WIN is a subdirectory) when using /DIR. * The columns are a bit further apart with /DIR. * The "Bytes free" line isn't displayed with /S. Haven't checked so much yet, please report any incompatabilities your find to me (baeck@swipnet.se). /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 parameter: L Does not display them in the directory listing S Ignores them in the summary You may specify them both if you like. D is default 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 aren't affected. /LFN The long filenames introduced in Windows 95 are displayed in bright white (see color coding) last on the line. If the name won't fit on the line, it will completely move on to the next line (i.e. LFNs aren't wrapped). /LWN Only displays the long filenames when it differs from the standard name. It's case-sensitive, if the original name is WIN.INI, the LFN 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 yellow. When this switch is set, or if the archive doesn't appear to be valid, light cyan is used. See color coding. /NOWARN No warnings will be issued with this switch set. These are the occasions when warnings will occur: * If more than one file path and/or file mask i specified. All parameters not beginning with slash ("/") or at ("@") is considered to be file masks. The second file mask will be ignored and the first one will be used. * When an invalid parameter to the /O is used. Only G, N, E, D and S are valid. That parameter will be skipped and the parsing will continue with the next parameter to the /O switch (if there is one). * Ditto, if an invalid parameter to the /A is used. Only A, D, R, H and S are valid. That parameter will be skipped and the parsing will continue with the next parameter to the /A switch (if there is one). * If both /W and some archive switch is used, a warning informs that the archive contents won't be displayed. * If /LFN is set, and your DOS version doesn't support long filenames (to this date, only MS-DOS 7.0 found in Windows 95 does this). * When two conflicting switches are set, i.e. if you specify both /OG and /O-G. The second switch will be ignored. * When a ZIP archive is too big, this usually happens with archives larger than 1000 files. /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: G Groups the directories together in the beginning of the listing. N Sorts ascending (A-Z) by name. E Ditto by extension. D Ditto by date, oldest first. S Ditto, 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[] 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. /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 be default separated by spaces, but can be separated by dots/periods with the /DA switch. /TF 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 the width, height and color depth of Truevision TGA (*.TGA) images. /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'll 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 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 in the command line The 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. --------------------------------------------------------------------------- Version history 1.20a (December 12th 1996) * Small GIF images don't cause error messages any more. * The "x% wasted" previously displayed completely wrong numbers with big directories, that has been fixed. * The complete path isn't always displayed with /B, only when /S is used. * Summary information is no longer displayed when the switches /B and /S are active. * The "Bytes free" line isn't displayed with /S when DIR compatability switch /DIR is active. 1.20 (December 6th 1996) * Direct video write is now optional, output now goes to stdout, enab- ling redirections. ANSI colors are used when writing to the screen. * /DIR switch to ensure complete DIR compatability, as some anomalies of DIR are a bit illogical, but could be needed for compatability. * Time/date format can now be specified exactly as you want it. Defaults to American style dd-mm-yy hh:mm{pm | am}. * /RDX to select the thousand delimiter to use for file sizes. * Command line file parsing now works with all path and extension combinations. * /B now displays the full path name for the files displayed. * /A is now compatible with DIR. * _?? files are now displayed as compressed instead of ??_. * Code further optimized. 1.10c (October 17th 1996) * File sorting performance increased by 85% due to a completely rewritten sort routine. * ZIP files that are too large don't result in a heap overflow and a program crash. * /P works even better. * Ctrl+S and Ctrl+C now works when listing archive contents. * Various other smaller bug fixes (e.g. some embarrasing documentation errors). 1.10b (September 4th 1996) * Long filenames are disabled when running in MS-DOS mode under Windows 95 since this has caused some systems to crash. * TGA image support. * /P now works correctly with archives. 1.10a (August 5th 1996) * Memory management is better, no more heap overflow when displaying a large amount of files, e.g. when using /S from the root. 1.10 (July 31st 1996) * The contents of ARJ archives are now displayed in the same way as ZIP, LZH and RAR archives. Activated with (surprise) /ARJ. * /LWN added. Prevents screen clutter by not displaying all long filenames. * The space allocated is shown with /BA. * Fixed bug that caused the file handles to run out when displaying archives. * Comments are allowed in configuration files. * Fixed bug the bug that sometimes placed one directory last in the listing, even when /OG was specified. * Shows file information on WAV and FLI/FLC files. 1.00a (June 19th 1996) * PCX images are supported with /PCX. * TGZ archives and Lempel-Ziv compressed ??_ files are now displayed in cyan like all other archives. * Various bug fixes and optimizations. 1.00 (May 19th 1996) * ZIP files are now displayed correctly. Previously, archives containing files with long filenames and/or directories were displayed as empty. 0.99e (April 24th 1996) * The date of files in ZIP arhives wasn't displayed correctly, which was now fixed. * Help page slightly changed with a new e-mail address and this URL added. 0.99d (March 28th 1996) * JPEG (*.JPG) support. Width and height is displayed. Activated with /JPG. * Support for the long filenames in Windows 95 through /LFN. * /43 is no longer needed, D keeps track of the number of lines used. 0.99c (March 3rd 1996) * A minor bug fix with the parameter parsing. 0.99b (March 2nd 1996) * Full GIF support with /GIF. * Serial number support with /SN. * Predefined switches can be put in a separate configuration file with @. * The directories . and .. can now be removed with /I. * The 8087 emulation library was removed, reducing EXE size with about 10 kB. * /PD was renamed to /DA. 0.99a (Feb 20th 1996) * A scroll bug was removed. * /S doesn't only displays summary information when there is a file match in a sub-directory. Earlier, "0 files, 0 bytes ..." was displayed for every directory searched (very annoying when doing a /S in the root direcotory. * ZIP archive support with /ZIP. No attributes are displayed yet, and any subdirectories in the ZIP aren't displayed correctly. * LZH archives are correctly identified. * The file sorting algorithm was optimized and the performance increased 20%. 0.99 (Feb 6th 1996) The first release. --------------------------------------------------------------------------- Lacking features Nothing's even close to perfect. These features will (hopefully) be added to D: * Multiple file masks. * Better support for long filenames and other Windows 95 features. * More image formats (TIFF e.g.) and sound formats (AU) will be added. * The tag of HTML files will be shown to make it easier to identify e.g. files in the Netscape cache directory. * Option to add more file extensions that are to be color coded. * Progress meter when sorting files. * Ability to have larger configuration files than 4 kB. I'm not planning to include these features: * Support for /C to display compression ratio of the files on compressed drives. If anyone knows how to do this, let me know. --------------------------------------------------------------------------- Downloading updates of [Wersting] D[ir] Below you'll find the primary sites where D can be obtained from. Join the [Wersting] D[ir] Update-by-mail list if you want to get D by mail when it's updated. Fill out the form at http://www.geocities.com/SiliconValley/5159/d.html and you'll get a confirmation from me. If you want to put [Wersting] D[ir] up on your FTP site let me know and I'll include your site to the list. * WDIR120A.ZIP (31 kB) from GeoCities, U.S.A. http://www.geocities.com/SiliconValley/5159/wdir120a.zip * WDIR120A.ZIP (32 kB) from Tele2 Swipnet, Sweden http://home2.swipnet.se/~w-22337/wdir120a.zip * WDIR120A.ZIP (32 kB) from Simtel.Net, U.S.A. http://www.simtel.net/pub/simtelnet/msdos/dirutl/wdir120a.zip ftp://ftp.simtel.net/pub/simtelnet/msdos/dirutl/wdir120a.zip