DIRECTORY LIST Version 4.0 (C) Copyright 1992-1994 Josh Poley "Your hardware is only as good as your software" Directory List is a program designed to replace MS- DOS's DIR command. With a variety of helpful and easy to use switches Directory List is a powerful utility for viewing the directories on your computer. Files included in this archive: Name: Description: Size: Date: DL.EXE The Directory List 60654 06-01-1994 program. DL.TXT This information text 40207 06-01-1994 file. Type DL /? for a quick help screen. Requirements: A 80286 or better system. MS-DOS 3.3 or higher. Directory List 4.0 Users Manual Page #i Directory List 4.0 Users Manual Page #ii Contents Introduction 1 Screen Shot 1 Attribute Symbols 1 Syntax 2 List of Switches 2 Switch Info 4 Switch Descriptions 5 Attributes 5 Information 6 Other 7 Pause 8 Sort Order 9 View 10 Custom Switches 11 Information on Colors 11 Example Uses 11 Shareware 12 Registering 12 Exit Codes 13 Dead Space 13 Auto Self Check 14 Benchmark Times 15 Testing 16 Testers & Debuggers 16 Liability 16 History 17 What's Next 20 Registration Form 21 Directory List 4.0 Users Manual Page #1 Introduction First Directory List shows the time and the date, next Directory List will show the file name being searched for. On the next line the selected disk label is displayed, then the disk's serial number (MS-DOS 4+), and then the current directory of the drive you are in. Below that are the files in three columns. The name of the file is displayed, to the right of that is the size of the file, unless it is a directory, and then the attributes are shown. After all the files are displayed the summary information is printed. This includes information about the dead space, the total file size, and total bytes free on the drive. Screen Shot The Screen Shot is only available in the printed manual. Attribute symbols r = Read only file (dark blue) h = Hidden file (light green) s = System file (light blue) When the screen fills up, you will be prompted to press any key. If you press the Escape key, the program will exit. If you choose to exit, the summary information at the bottom of the list will only contain information on the files that were displayed. All of the files that were not displayed will not be included in the summary information. Also if you press the Escape key while Directory List is performing a recursive function in the directories (i.e. with the /isa switch) the program will continue as if the switch was not invoked. One of the most noticeable features of Directory List is that it displays the directories and the attributes in a different color. This enables you to gain information about each file with a simple glance at the output. There is also room for a very large file size. This is extremely handy when viewing files on a CD-ROM or other media where the file size can be in the 100 megabyte range. NOTE about CD-ROMs: Since the CD-ROM is read only, all files are marked as read only. Since this is the case, Directory List will automatically default to the /A* (display all files) switch when viewing a CD-ROM drive. Directory List 4.0 Users Manual Page #2 Syntax: DL [d:\path\filename.ext] [file2.ext] [switches] The filenames can include wild cards (* and ?). file2.ext is an optional filename, and can be an entirely different directory or drive, but the files will be mixed together in the same list. NOTE: If you wish to view the contents of a directory specified in the filename. You need to place a backslash after the directory name. This will tell Directory List that you wish to view inside that directory and are not looking for a file by that name. (i.e. DL \test\ equals DL \test\*.* but does not equal DL \test). The switches are: Help: /? - Help. Attribute: /ad - List directories. /!ad- All but directories. /ah - List hidden files. /!ah- All but hidden files. /as - List system files. /!as- All but system files. /ar - List read only. /!ar- All but read only. /a* - Show all files. Information: /id - Show date. /it - Show time. /is - Show size of dirs. /isa- Show allocated size of dirs. /iw - Show wasted space. /in - Show number of files in directories. /ia - Show allocated size. /ic - Show number of clusters. Other: /ot - Directory tree. /ow - Write list to file. /oa:R - Set the ASC rate where R = 0(never) to 10(always). Pause: /pe - Ending pause. /pn - No pause between pages. Directory List 4.0 Users Manual Page #3 Sort Order: /sn - No sorting. /sz - Sort by name Z-A. /ss - Sort by size 0-9. /!ss- Sort by size 9-0. /se - Sort by .ext A-Z. /!se- Sort by .ext Z-A. /sd - Sort by date Jan. - Dec. /!sd- Sort by date Dec. - Jan. /sa - Sort by attribute, directories first. /!sa- Sort by attribute, files first. View: /ve - Executable files. /!ve- All but executables. /vt - Text files. /!vt- All but text files. /vc - Code files. /!vc- All but code files. /va - Archived files. /!va- All but archived files. /vd:MMDDYY - List files after the date. /!vd:MMDDYY- List files before the date. /vs:S - List files larger than the size S. /!vs:S- List files smaller than the size S. Directory List 4.0 Users Manual Page #4 Switch Info The not operator (!) will reverse the effect of the switch. NOTE: You do not have to use a slash (/) to specify a switch. You can also use a minus (-). You can have up to fifteen switches and they can be in upper or lower case. You can also have up to fifteen environment switchs. All arguments are optional. If no drive or path is specified, the current drive and path will be used. If no filename.ext is entered, the default will be "*.*". The default displays normal files in current directory (only directories and files that are not hidden, system, or read-only) their file size, and sorts them from A-Z. Directory List's switches are set up in several divisions. The first letter of the switch will tell you which division the switch comes from, the second (and possibly third) letter will describe which function it performs. Switch setup: /!DF:V Divisions: / - Slash. This starts the switch. You can also use a minus (-). ! - Not operator. Optional addition that can reverse the effect of the switch. ? - Help. D - Division letter. A - Attributes. F - Function letter(s). I - Information. : - Colon. Optional addition O - Other. that signifies that there P - Pause. is information attached S - Sort. to the switch. V - View. V - Variable. Some information that the user wishes to pass on to the program. Only used if there is a colon. Directory List 4.0 Users Manual Page #5 Descriptions Help /? - Help. Help screen. Attribute /ad - List directories. Display directories only. /!ad- All but directories. Display everything but directories. /ah - List hidden files. Display hidden files only. /!ah - All but hidden. Lists files that are not hidden. /as - List system files. Display system files only. /!as - All but system. Shows all files that aren't marked system. /ar - List read only. Display read-only files only. /!ar - All but read only. Shows all files that are not read only. /a* - Show all files. Display ALL files. Default when looking at a CD-ROM drive. Directory List 4.0 Users Manual Page #6 Information /is - Show size of dirs. Shows the size of the directories. It lets you see how big each directory is without going into each one and adding up the file sizes in each sub directory. NOTE: If you use this switch with the sort by size switch the directories will not be sorted by their total size, instead they are put first in the list. This switch affects what is printed after directories only. /isa- Show allocated size of dirs. This is exactly like the /is switch but it will also add in the allocated (wasted) space. This switch affects what is printed after directories only. /in - Show number of files in directories. Counts how many files are in each directory. NOTE: This count does not include sub directories as files, i.e. if there are 5 sub directories in the TEST directory, but only 2 files, the count will be 2. This switch affects what is printed after directories only. NOTE: Pressing while Directory List is stepping through the directories will cause Directory List to stop and makes it act like the /is, /isa, or /in switch was never invoked. NOTE: When using the /is, /isa, or /in switchs, an extra summary line will be added. This will display the total number for that switch. (i.e. when using the /isa switch the summary info will show an extra line displaying the total space used by the directories.) /id - Show date. Show file date instead of file size. /it - Show time. Show file time instead of file size. /iw - Show wasted space. Show amount of space wasted by file instead of file size (dead space). /ia - Show allocated size. Show total allocated space by the file instead of the file's size. /ic - Show number of clusters. Count how many clusters the file takes up, and display this instead of the files size. Directory List 4.0 Users Manual Page #7 Other /ot - Directory tree. The quick directory tree is a quick list of your directory structure, although this version wont sort the directories. /ow - Write list to file. With the /ow option, you can write the output to a file. All output will be written to DIRECTRY.LST. If DIRECTRY.LST already exists, the output will be appended to the original file. NOTE: Since Directory List does not use the standard output (in order to display colors and faster output) you won't be able to use DOS's redirection command (>) to write the output to a file or the printer. This is why Directory List has a built in 'Write to File' option. /oa:R - Set the ASC rate. Using the /oa:R switch enables you to set the Auto Self Check rate (ASC). Where R is between 0 and 10. 0 = never and 10 = always. The default rate is set to 2 (a 20% chance of the ASC being run). Directory List 4.0 Users Manual Page #8 Pause /pe - Ending pause. The finishing pause switch replaces DLP.EXE in older versions. You can now pause the program at the very end with the /pe command. Sometimes this switch is useful in case you want to run Directory List from a shell or other environment and don't want to be rushed back to the other program before you have a chance to view the files. /pn - No pause between pages. The no pause switch makes Directory List keep scrolling and doesn't stop after each page. Directory List 4.0 Users Manual Page #9 Sort Order /sn - No sorting. Allows you to view the files as they are arranged in the directory. /sz - Sort by name Z-A. Sorts the files by filename from Z to A. /ss - Sort by size 0-9. Sorts the files by their size, from smallest to largest. Since directories do not have a size, they will come first. /!ss- Sort by size 9-0. Sort by file size from largest to smallest. /se - Sort by .ext A-Z. Sorts by file extension. From A to Z. /!se - Sort by .ext Z-A. Sorts files by file extension. From Z to A. /sd - Sort by date Jan. - Dec. Sorts by the file's date. From earliest to today. /!sd - Sort by date Dec. - Jan. Sorts files by their date. From Most recent to earliest file. /sa - Sort by attribute, directories first. Sorts files by their attribute. If you wish to see directories first, then files, sort the files by attribute. /!sa - Sort by attribute, files first. Sorts files by their attribute. Displaying files before directories. Directory List 4.0 Users Manual Page #10 View /ve - Executables. Display executable files only (.COMs, .EXEs, or .BATs). /!ve- All but executables. Display everything but executable files. /vt - Text files. Display text files only. (i.e. .TXT, .DOC etc.) /!vt - All but text files. Lists all files that do not have an extension of .TXT, .DOC etc. /vc - Code files. Display program code files only. (i.e. .C .BAS etc.) /!vc - All but code files. Show all files that are not code files. /va - Archived files. Display archived files such as .ZIP, .ARC, etc. /!va - All but archived files. Display files that are not archived. /vd:MMDDYY - List files after the date. Display all files after given date. If you want to view files after the date July 5, 1993 you would use /vd:060593. /!vd:MMDDYY- List files before the date. If you use /!vd:MMDDYY you will get a list of files before the date specified. /vs:S - List files larger than the size S. View files that are larger than the given size. If you are looking for files larger than 1024 bytes you would use /vs:1024. /!vs:S - List files smaller than the size S. If you use /!vs:S you will get all files smaller than S. Directory List 4.0 Users Manual Page #11 Custom Switches If you want to use different switches for the default all you have to do is edit your AUTOEXEC.BAT file. Add the line "SET DL=[switches]" to your autoexec file. Example: If the line "SET DL=/!se /pn" is in your autoexec file and you run DL.EXE the output will sort the files by extensions from Z to A and there will be no pause between pages. Colors The directory names are printed in dark green, the read- only-file symbol is in dark blue, the hidden-file symbol in light green, and the system-file symbol is in light blue. The label and serial number are in cyan. The date and time are in red. The total bytes, bytes free, and number of files are in brown. Error messages are in white. Example uses DL b: Displays normal files in drive B, in the current directory of that drive. DL /ah /ar Displays the files that are hidden and read only in the current directory. DL \test\*.exe /ss /it Displays the .EXE files in the TEST directory; sorts them by size (0-9) and displays the time instead of the size. DL TEST\ /VT /OW Looks for text files in the TEST sub-directory and writes them to a file. DL ..\test\ Lists normal files the test sub directory. The test directory is up one from your current location and then down. i.e.: PARENT / \ YOU TEST Directory List 4.0 Users Manual Page #12 Shareware This program is shareware. The only way I can continue to update this program is if I get responses from the users. I have completely run out of ideas and need information from the people who use this program. Without support from users there will be no updates. I hope that the people using this program will encourage and help push Directory List to new limits, but without your support it will be impossible for this program to continue its progress in reaching new heights. I feel that the price of the software is very moderate considered the use ability of this program, not to mention the amount of time I have spent on developing this program. You may pass this program along to friends and BBSs as long as all original files are included with the program and these files are not edited or altered in any way. Registering Registration package #1 for $10.00: ú The latest version, (if you have the latest version I will send you the next version as soon as it comes out). ú You will also receive a catalog of other useful programs (Shareware and Freeware). Registration package #2 for $25.00: ú All of the above. ú A printed manual. The manual is a printed version of this text document (with nice fonts etc.) but also has a few more sections. ú And you can receive the newest version of Directory List, as they come out, if you send me a disk for each version. All funds must be in US dollars. Please view the section on Shareware. There is a printable registration form at the end of this document. If you have any problems, suggestions, or want to register; please write to me at: Josh Poley 1020 55th Street Boulder, Colorado 80303 USA You can also reach me at josh.poley@Pinecliffe.COM through the Internet. Directory List 4.0 Users Manual Page #13 Exit Codes When Directory List exits back to your operating system, it returns with an error code. This code can be viewed from a batch file with the ERRORLEVEL command after executing DL.EXE. Error Codes: Description: 0 Everything fine. 1 Help Screen. 2 ASC found an error in the file. 3 was pressed, causing an exit. 4 Not enough memory for all the files. 5 No files were found. 6 or pressed. For most of the errors a message will be display informing you of the problem. Dead space A disk is made up of a bunch of clusters. Only one file can occupy a cluster at a time. But unfortunately the cluster size can be extremely large (4096 bytes) or even larger. For example if I have a file that is 1024 bytes long and my cluster size is 4096 bytes, the extra 3072 bytes (4096-1024=3072) are wasted. If a file is larger than the a cluster it will take up several clusters. If a file is 4098 bytes and the cluster size is 4096 the file will fill up one cluster and 2 bytes in the next cluster. In that second cluster all 4094 bytes are "dead". Also, each directory name will take up the full cluster size. Directory List 4.0 Users Manual Page #14 Auto Self Check (ASC) Starting with version 3.4 Directory List has an Auto Self Check. This makes the EXE file a bit larger and takes a bit of time in the beginning to check the program. This feature was added as a means to protect from virus attacks and file corruption. If the self check notices a change in the file it will display a message informing you of an error, the program will immediately exit and you should then delete the file and replace it from your original source. The bit of time that is required before Directory List is run is worth it compared to the damage that can be caused by a virus on a frequently used program such as Directory List. The ASC is NOT run every time the program is run. The rate can be set from 0 to 10 (0% to 100% chance of running). Ten (or larger numbers) forces Directory List to run the ASC every time. And 0 eliminates the ASC all together. The /oa:R switch can be used to set the rate. If you are using a fast computer, I suggest that you use the ASC every time Directory List is run. Or, if you are using a slow computer, you might want to ignore the ASC altogether. View the section on custom switches to see how to set up a permanent rate. The default rate is set to 2 (a 20% chance of the ASC running). I am using Blockade (which is a copyrighted "self checker" from Indusoft Corp. (C) 1991, 1992) for the ASC functions. Indusoft Corp. P.O. Box 26747 Greenville, SC 29616-1747 USA See Benchmark Times section to see about how much more time the ASC will take. Directory List 4.0 Users Manual Page #15 Benchmark Times Directory List Without ASC With ASC With Disk Cache 1.3152 1.5040 Without Disk Cache 1.6865 1.8711 DIR One Column Wide Format With Disk Cache 8.6085 3.6700 Without Disk Cache 8.4047 3.6502 DIRE One Column DIRE is a share- With Disk Cache 3.6520 ware program. (C) Without Disk Cache 3.7119 Bruce Pennypacker DIRM One Column DIRM is a share- With Disk Cache 3.5392 ware program. (C) Without Disk Cache 3.6432 Michael P. Rice These time were generated with PROGTIME.EXE in a directory with 732 files, no sub directories, and are an average of 10 runs. All times are in seconds. Of course these times will differ from system to system. Directory List 4.0 Users Manual Page #16 Testing I have tested this program on several computers with different configurations. Should you come across a configuration where Directory List does not function properly, please let me know so I can promptly try to fix the problem. Testers & Debuggers Loren Blaney Jeffrey O. King Robert Poley Liability I, THE AUTHOR OF DIRECTORY LIST, AND ALL OF MY CORRE SPONDENCE, HOLD ABSOLUTELY NO RESPONSIBILITY FOR ANY DAM AGES THAT MAY BE CAUSED AS A RESULT OF USING THIS PROGRAM CALLED DIRECTORY LIST. THE USER OF THIS PROGRAM TAKES FULL RESPONSIBILITY FOR ANY AND ALL DAMAGES OR UNEXPECTED HAPPENINGS THAT MAY OCCUR FROM THE USE OF THIS PRODUCT. SHOULD A PROBLEM OCCUR, AND IN THE EVENT OF CERTAIN OCCURRENCES, SOMETHING WAS DAMAGED, ALTERED, OR OTHERWISE CHANGED; THE USER WILL OPENLY TAKE THE FULL BURDEN AND CONSEQUENCES FOR THE HARMED MATERIAL. ALL PREVIOUS VERSIONS OF DIRECTORY LIST, VERSIONS 4.0 AND EARLIER, ARE ALSO INCLUDED IN THIS STATEMENT. BY EXECUTING, RUNNING, VIEWING, STORING, ARCHIVING OR OTHERWISE HAVING ANY CONTACT WITH THIS INFORMATION FILE AND/OR THE DIRECTORY LIST PROGRAM YOU FULLY ACKNOWLEDGE THIS STATEMENT AND AGREE TO IT AND ALL OF ITS EXPLICITLY DEFINED OR OTHERWISE IMPLIED ELEMENTS. I am using a Gateway 2000 486dx - 33; 8 meg of memory. With MS-DOS 5.0, Windows 3.1, and Smart Drive disk cache. Directory List is compiled for 80286 systems and various configurations were tested, including different memory managers, computers, stacked drives etc.; yet there may be incompatibilities with your system. If you find such a problem, please inform me so I may find a remedy to this unfortunate incompatibility. Directory List 4.0 Users Manual Page #17 History Note about version numbers: Starting with version 2.1 I just step through the version numbers. 2.9 is the same as 3.0 only 3.0 is a bit better. And 3.1 is the same as 3.2 only 3.2 has some more features, fixed bugs, etc. And so on. There is also a gap before version 4.0. Since I rewrote most of the code and did some major changes in the code, as well as the documentation. Directory List version 1.1 -- The dawn of time I found the findfirst() and findnext() functions in the C language, and Directory List was born. Was originally called DDDIR.EXE. Directory List version 2.1 -- November 1992 Rewrote the whole thing using pseudo-object oriented programming (C++). (The 'pseudo' because this was my first attempt at the C++ language). Now called Directory List. Directory List version 2.2 -- 1/25/1993 Shortened up some code. New paused version (DLP.EXE). Fixed the problem with the ".." dir. Directory List version 2.3 -- 1/29/1993 I added the exit option when the program is paused. Directory List version 2.4 -- 1/31/1993 Can use both lower and upper case letters in the switch options. Directory List version 2.5 -- 3/21/1993 Here are the sorting options. You can sort by file name (auto) or by file size. You can also select the no sort option, letting you view the files as they appear on the disk (norm for earlier versions). Directory List version 2.6 -- 3/21/1993 Added commands to view the date and the time. Plus backward sorting (9-0 and Z-A). Directory List version 2.7 -- 3/30/1993 You now have the option to eliminate the pause between screens. Sorting by the file extensions is now available. Directory List 4.0 Users Manual Page #18 Directory List version 2.8 -- 3/31/1993 Fixed a couple of bugs ("dl b:\*.*" displayed all files as directories, read only, hidden, and system). Sorts by file name when the size is the same (when sorting by file size). Also prints commas in the total file size and the total bytes free. Directory List version 2.9 -- 4/3/1993 Real dynamic memory allocation. Sort by date, and by extensions backwards. View the size of the directories and sub directories. Directory List version 3.0 -- 4/10/1993 More switches. No DLP. Default shows only normal files. Quick directory tree. Uses Assembly for some functions (thanks Nguyen!). Directory List version 3.1 -- 4/15/1993 A few more colors. Shows the volume label. Formats the file names, centering them around the '.'. Displays the disk serial number (0000-0000 hex). Slightly enhanced directory tree. Can write output to file. Fixed a bug. The label and such are displayed for the directory you are looking at, not the current directory. The date and time are shown in red. Directory List version 3.2 -- 4/21/1993 Show executables only (/ve switch); show text files (/vt switch); show common code files (C ASM BAT PAS etc.) with the /vc switch. Did some repairing. Altered the switches. Included a "not" option on some switches which reverses the effects of the switch. Directory List version 3.3 -- 4/28/1993 Included the /va switch for .ZIP, .ARC, etc. Shows the wasted space (dead space) information and /iw shows dead space for each file. /in is new. Directory List version 3.4 -- 5/4/1993 You can now use the "..\" as the file name to view files one directory lower. Fixed a new bug. Added the Auto Self Check (ASC). Batch file for custom switches. Directory List version 3.5 -- 5/12/1993 Added /ia and /ic switches. You can now have up to five switches at once. Vertical columns are default and you can use the /oh switch to view the files with horizontal columns. Added the clear screen option, the sort by attributes, scroll one line at a time, and the lower case file names options. Directory List 4.0 Users Manual Page #19 Directory List version 3.6 -- 5/27/1993 Fixed a very big bug (some files were getting lost). Added the ASC rate option; and the look for files after or before some date, larger or smaller than some size. Fixed another bug. Directory List no longer displays the "." and ".." dirs. Directory List version 3.7 -- never released Added a switch to erase the pause message. Cleaned up some things. Added country specific date, time, etc. formats. Added the /isa switch. Did some more speed optimizations. Added /od and /o. switches. Directory List version 4.0 -- 6/1/1994 Reworked the C++ coding. Broke the code up into different files for the different objects. Revised switch setup (i.e. /ss! went to /!ss). Can have up to 15 command line switches. Added environment switches directly into Directory List (no need for the batch file). Took out a few options. Writes text directly to video screen memory (DMA). Dynamic screen height (if the height of your video mode is 44 chars, Directory List knows and uses it). Major optimizations to speed and size. Got friends to help debug the code. Revised the dynamic memory allocation. Detects CD-ROM drives. Moved the thinker (the little spinning triangle) to a background routine (interrupt driven). Fancy Ctrl-C and Ctrl-Break handling. Directory List 4.0 Users Manual Page #20 What's Next Here are a few possible additions to Directory List. Whether or not these will be implemented depends entirely on my motivation to continue programming Directory List. Naturally any type of response from a user will encourage me to delve into these and other features. If you see something here, or have an idea of your own, please contact me. I would be glad to go out of my way to make additions to Directory List if people would find them useful. ú A "not" filename allowing you to view files that do not include filename in the name. ú A DIR /s equivalent switch to view multiple directories. ú Have multiple columns (1- 5 columns?). ú Include direct printer output. ú Display deleted files. ú Accept [] in file name (i.e. DL [ab]*.* looks for all files that start with an 'a' or a 'b'). ú Display 4DOS's description file info (descrpit.ion). ú Display files inside an archive. ú Show compression ratio for files on stacked drives. Directory List 4.0 Users Manual Page #21 Registration Form Name: ____________________________________________________ Company: _________________________________________________ Address: _________________________________________________ City: __________________ State: _________ Zip: ___________ Country: _______________ Telephone: ______________________ Current version: _______ Where you found DL: _____________ Disk size: Registration Package: 5.25" Low Density [ ] Package 1 $10.00 [ ] 5.25" High Density [ ] Newest version. 3.5" Low Density [ ] Package 2 $25.00 [ ] 3.5" High Density [ ] Subsequent versions. Printed manual. All funds must be in US dollars Send all correspondence to: Josh Poley 1020 55th Street Boulder, Colorado 80303 USA Please include any other information including bug reports, comments, and suggestions. ________________________________________________________ ________________________________________________________ ________________________________________________________ ________________________________________________________ ________________________________________________________ ________________________________________________________ ________________________________________________________ ________________________________________________________ Directory List 4.0 Users Manual Page #22 Thank you for looking at Directory List (C) Copyright 1992-1994 Josh Poley * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * End of DL.TXT