B.EXE directory lister for OS/2 and DOS Version 1.11 December 5, 1994 Dohn Arms Copyright (C) 1994 Dohn Arms Permission to use, copy and distribute this software and its documentation for any purpose and without charging more than a nominal fee for copying is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty. This program is "freeware" which means that you do not have to pay for it. It is not public domain, which means that I own the program and no one is allowed to alter the program before redistributing it. The only thing that I ask of anyone that actually uses my program is that if they have access to email, that they send me a message telling me if my program is particularly useful or not. I just want to see if people actually use this or not. My email address is: dohnarms@uiuc.edu . What is this program? This is a command line program that is to be used to view the contents of a directory. This program is designed to be an enhancement of DIR. I don't say that it is a replacement of DIR because that my program does not do everything DIR does, such as recursively searching subdirectories. However, DIR does not find the total size of directory trees either, which B does. B is made to easily view the information contained in a directory. B will only show file names if asked, or it can show just file names and file sizes. Finding the free space on a hard drive has been relegated to a switch, since finding the free space can halt the program momentarily. B highlights file names with certain extensions for easy finding, and the extensions can be changed with an environment variable. For convenience, I included both a DOS and OS/2 executable, so that it can be used in either environment. What's with the name? The name was simply a convenience for me due to the fact that I like one letter names for programs that I use a lot. I already had programs named C, D, and E, so I named it B. If you don't like this (which I would probably think true), rename it to whatever you like. The program is written with renaming it in mind. The help text text (seen with /? switch) will reflect the new name, as will the environment variable. The only condition is that you must keep the .EXE extension in the new name (there are ways to run EXE programs after dropping the .EXE extensions). So change B.EXE to BDIR.EXE if you like, and look at the help screen. The environment variable would then be BDIR, also. Description: When run, you will see all the files and subdirectories in a directory. The uppercase brown names are the subdirectories. The gray names are files that do not have an extension that is being searched for. Anything of another color is a file of a searched-for extension; the colors are yellow, light green, red, cyan, and light cyan (these are the official names for these colors). By default, the extensions for OS/2 are EXE, COM, CMD, DOC, and TXT. For DOS, they are EXE, COM, BAT, DOC, and TXT. If there is an asterisk next to a subdirectory or a file, that means that the file or subdirectory is hidden (from normal view, anyway). If the name of a file is uppercase, that means the file is either read-only or is a system file or both (if the file is composed of characters with no cases (such as numbers), you won't be able to tell). In the normal view (/N), there will be a size in bytes next to each file, and a "" next to each subdirectory. In the date-time view (/D), there will be the time and date of the last write of each file. If the file or subdirectory name is longer than 13 characters, in the OS/2 version of B, there will be a ">>" character at the end showing that the file name has been cut off. To view the full name, you must use the /L switch, which allows the full name to be shown. Under the listing of files and subdirectories, the directory being shown is displayed. Under that is the total number of files shown, with the total size of the files (I haven't fixed B to add EA's yet). Also, to the side of this is the total number of subdirectories shown, also. If all the files can't fit onto the screen, the scrolling stops when the maximum number per screen has scrolled by. If you don't want to see any more of the files, you can stop the scrolling by merely pressing the Escape key ("Esc"). All the files that were visible remain visible on the screen. If you use the environment variable to set default switches (described later), and if you want to override certain switches, except for the switches controlling the number of columns (/N, /W, /D, and /L) and the switch for changing highlighting extensions (/C), the switches will toggle. So if you have it defined to show the free space every time with /F, you can turn it off on the command line by using /F again. Form of Command: B.EXE [path][wildcard] [/?] [/W | /N | /D | /L] [/Z] [/O | /S] [/F] [/E] [/C [ext 1] [ext 2] [ext 3] [ext 4] [ext 5]] Switches: /? (or /H) is the help screen. This will give a brief description of the switches. It also shows exactly what environment variable a renamed B looks for in order to replace the default file highlighting extensions. /W is the wide view with the names of the files and subdirectories only. Five columns are shown on the screen. This switch will show the maximum number of names. /N is the normal (and default) view, with the sizes and the names of the files and subdirectories shown. Three columns are used. /D is the detail view with the times, dates, sizes, and names shown for the files and subdirectories. Two columns /L is the long view. It is the same as /D except the full name is shown (OS/2 only) and only one column is used. /O shows only the names of files, and no subdirectory names. /S shows only the names of subdirectories, and no file names. /F shows the amount of free space left on the drive which holds the directory being looked at. /E shows the extensions used to highlight files. /C changes the extensions used to highlight files, with up to 5 extensions being specified. Just specify up to three letters or numbers comprising the extension, for each. Environment Variable The B environment variable changes the way B behaves by default. If you like to see different extensions by default, you specify them here. The form of the command to do this is: SET B=(command line switches) Do this in your CONFIG.SYS in OS/2, your AUTOEXEC.BAT in DOS, or your command line for either. NOTE: If you changed the name of B to something else, the environment variable will also be changed from B. If you renamed B.EXE to BDIR.EXE, the variable would be BDIR. Contacting the Author: If you have any comments about my program, feel free to email me or write me. I actually want to hear from you if you actually use this, so I know my work in putting this on the Internet has not been in vain. I hope you find this useful. E-Mail: dohnarms@uiuc.edu Mail: Dohn Arms Loomis Laboratory of Physics 1110 West Green Street Urbana, IL 61801-3080