DOC 1.1 documentation file ----------------------------------------------------------------------- Please note - this is a plain ASCII text file but contains multiple documents. You may find it most convenient to view or print this file using the DOC.EXE program supplied. ----------------------------------------------------------------------- Title1:PC Magazine Utilities Title2:Volume 1 Copyright:(C)1992 Ziff-Davis Publishing @@Introduction Introduction PC Magazine Utilities Disk Volume 1 ------------------------------------------------------- Volume 1 of the PC Magazine Utilities contains 35 utilities ready-to-run plus comprehensive on-disk documentation and an install program. Installing the programs ----------------------- If your PC has a hard disk, you can use the install program (started by typing GO) to copy the programs onto it. You can then change to the new directory containing the programs and try them out. After installing the software, you can come back to this documentation by changing to the relevant drive and directory and entering the command DOC. If you have a floppy-only PC or you don't want to put all of the programs straight onto your hard disk, you can run them directly from this floppy. In this case, we suggest that you make a working copy of your original disk with the DOS DISKCOPY command and keep your original somewhere safe as a back-up. For more information about setting up and starting the programs, see the "Tech Notes" document. Program summary --------------- The utilities on this disk cover a wide variety of tasks... you may not need them all but you're sure to find some useful ones. This summary lists the programs in general categories so that you can quickly see what facilities are available and which programs are of most interest to you. Remember even if you don't need a particular program now, you may find it's just what need in future so it's worth getting familiar with the programs. --- General utilities --- COMPUTE Command-line calculator CONCEAL Blank screen & hide files HUGECALC (HC) 254-digit calculator LOCK & UNLOCK Encrypt sensitive files LOG Track computer usage PCSORT Fast, versatile SORT utility SNAPSHOT Capture and recall screens TED Compact full-screen text editor --- Disk & File utilities --- ATTR Set file attributes BAC Handy back-up program DDIR 2 column DIR listing DSCAN Check for bad sectors FFF Fast file finder FREE Report disk free space FSIZE Report actual disk space used LOCATE Search for word or phrase PRUNE Rearrange and tidy directories RED Quickly move a file RENDIR Rename a directory WIPE Permanently delete a file XDEL Delete selected files --- DOS command and batch file utilities --- ALIAS Command line editing and recall BAT2EXEC Compile batch files to .COM programs CDX Enhanced change directory command NO Run command on all files except... PUSHDIR & POPDIR Save and restore current directory SWEEP Run command in all sub-directories WAITASEC Scroll back DOS screen --- Keyboard utilities --- KEY-FAKE Simulate user keystrokes ONEKEY Simple keyboard macros TYPEFAST & TPFST-AT Keyboard repeat speed-up --- Printer utilities --- LPTPORT Swap LPT1 and LPT2 over PCBOOK Print booklets on LaserJet printers PP Print text files neatly PRSWAP ASCII-only printer filter @@Tech notes Tech Notes PC Magazine Utilities Disk Volume 1 ------------------------------------------------------- This document provides general advice for using and setting up the PC Magazine utilities on this disk. It is divided into these sections... 1. Disk contents 2. Installing the programs Installing the programs from DOS Saving hard disk space Working on a floppy-only PC Putting the programs in your DOS command PATH Loading programs from AUTOEXEC.BAT Using TSR (memory-resident) programs 3. Viewing and printing the documentation 4. Customizing the utilities Tables of scan codes (SS) shift masks (MM) color values sound values 1. Disk contents ================ This disk contains the following files. These are stored in the root directory as normal and are ready to use. Files marked * are part of the installation and documentation programs rather than the utilities themselves. ALIAS COM ALIAS program ATTR COM ATTR program BAC COM BAC program BAT2EXEC COM BAT2EXEC program CDX COM CDX program COMPUTE COM COMPUTE program CONCEAL COM CONCEAL program DDIR COM DDIR program *DOC EXE Documentation viewer DSCAN EXE DSCAN program FFF EXE FFF program FREE COM FREE program FSIZE COM FSIZE program *GO EXE Install program HC EXE HC program KEY-FAKE COM KEY-FAKE program LOCATE COM LOCATE program LOCK COM LOCK program LOG COM LOG program LPTPORT COM LPTPORT program *MANUALS1 TXT Documentation file NO COM No program ONEKEY BAS ONEKEY program PCBOOK EXE PCBOOK program *PCLOGO EXE PC Magazine logo display PCSORT COM PCSORT program POPDIR COM POPDIR program PP COM PP program PRSWAP COM PRSWAP program PRUNE COM PRUNE program PUSHDIR COM PUSHDIR program RED COM RED program RENDIR COM RENDIR program SNAPSHOT BAS SNAPSHOT program SWEEP COM SWEEP program TED COM TED program TPFST-AT COM TPFST-AT program TYPEFAST COM TYPEFAST program UNLOCK COM UNLOCK program WAITASEC COM WAITASEC program WIPE COM WIPE program XDEL COM XDEL program 2. Installing the programs ========================== To install these programs to a hard disk, use the install program provided (started by typing GO). Around 350K of free space is required for all of the programs and documentation... this will be checked for you automatically. The install program initially offers to install the programs to a new directory on drive C called PCVOL1. (C:\PCVOL1). If you wish to use a different directory or a different hard disk, simply type in a new name. For example, enter D:\PCMAG to put the programs into a PCMAG directory on your D drive. You can name an existing directory if you prefer in which case the install program will add the new programs to any files already there. Once you've entered the directory name, disk space is checked and then the files are copied across. After installation is complete, you can return to the opening menu (for example, to view the documentation) or go straight to the new directory. Installing the programs from DOS -------------------------------- You can install all of the programs or just selected ones using the DOS COPY command in the normal way. For example, to add the file PP.COM to your normal C:\UTILS directory, enter a command such as COPY A:\PP.COM C:\UTILS If you do this, you might also want to copy the files DOC.EXE and MANUALS1.TXT to a suitable directory so that you have the documentation to hand. Saving hard disk space ---------------------- If you are short of hard disk space, you can remove those utilities you are not using from your hard disk with the DOS DEL command in the normal way. You may also want to delete the documentation files (DOC.EXE and MANUALS1.TXT) as you can always print out those parts you need or use the original floppy when you need to refer to it. Working on a floppy-only PC --------------------------- If you do not have a hard disk, we suggest that you make a working copy of this disk using the DOS DISKCOPY command. You can work directly from this copy or use the COPY command to copy those programs you require onto your startup disk or other working disks as necessary. For example: COPY B:PP.COM A: ...copies PP.COM from this disk to a disk in drive A A:TED ...runs the TED program from this disk in drive A B: LPTPORT ... starts the LPTPORT program from this disk in drive B by first changing to drive B. Putting the programs in your DOS command PATH --------------------------------------------- You can start the utility programs by either: Changing to the drive and directory they are in and then entering the relevant command. For example: C: CD \PCVOL1 TED or Giving the relevant drive and directory before the command name (DOS 3.xx and later only). For example: C:\PCVOL1\TED However, it's easier if you make the programs available from any disk and directory by ensuring that they are in your DOS command search path, set with the PATH command. You can do this by either: Adding the directory the utilities are in to your normal PATH command in AUTOEXEC.BAT. For example, if the PATH command in your AUTOEXEC.BAT file reads C:\DOS;C:\UTILS;C:\WINDOWS you might change it to read C:\DOS;C:\UTILS;C:\WINDOWS;C:\PCVOL1 You should be careful when making changes to AUTOEXEC.BAT not to disturb other commands already in it. See your DOS manual for full instructions. or Copying those programs you use often to a directory already in your PATH command. Many PCs already have a directory called C:\BIN or C:\UTILS for small utility programs like these. For example, if you have a C:\BIN directory on drive C and use the DSCAN program often, copy it across with a command like this: COPY C:\PCVOL1\DSCAN.EXE C:\BIN Loading programs from AUTOEXEC.BAT ---------------------------------- Many of these utilities are designed to be loaded or run whenever your PC is working by placing the relevant command in the AUTOEXEC.BAT startup file. Before doing this, we recommend that you test the utilities out by loading them from the command line as normal to ensure that they operate correctly with your other software. Please bear in mind: * The program file must be available for AUTOEXEC.BAT to load it. If it is not in a directory already named in a PATH command earlier in AUTOEXEC.BAT, you must give the drive and directory where it is stored (e.g. C:\PCVOL1\PRSWAP) or copy the file to the root directory of the hard disk. * The order in which resident programs are loaded can be significant. If there appears to be a conflict, try re-ordering the lines in AUTOEXEC.BAT. * If your AUTOEXEC.BAT file starts a particular program or menu system running, the command to do so will normally be the last in the file... add any commands to load TSR programs before it. * Always keep a startup floppy to hand and a back-up copy of your AUTOEXEC.BAT file so that if problems arise you can restore things to normal. Using TSR (memory-resident) programs ------------------------------------ Many of these utilities are 'TSRs' or memory-resident programs. These load into memory when first started and remain there, either operating invisibly or waiting to be called up. TSR programs are very popular and those on this disk are carefully written and fully tested. However, the design of DOS means that there is always a chance of conflict between different TSR programs or between a TSR and your main software. To avoid problems, please note: 1. You should carefully test any new TSR program on your system before using it while doing your normal work. 2. Each TSR uses up memory. If you load too many at once, your normal software may not be able to run or may perform poorly. 3. If you discover a conflict, loading the TSRs in a different order may resolve it. 4. You can change the 'hotkey' used to call up many of the TSRs on this disk to avoid a conflict with your other programs. See the manual for the program in question and the notes and tables below. 3. Viewing and printing the documentation ----------------------------------------- The documentation for these programs is supplied in a plain ASCII text file called MANUALS1.TXT. You can view or print this file using normal DOS facilities (such as TYPE, MORE and PRINT) or third-party products such as most word processor or text editor programs. However, since MANUALS1.TXT contains multiple documents you will probably find it most convenient to view or print it using the DOC.EXE program supplied. To start DOC after installation, change to the drive and directory where you installed the disk to (e.g. enter C: then CD \PCVOL1) and then enter DOC. For full information on using DOC, see the document entitled DOC. 4. Customizing the utilities ---------------------------- Most of these utilities are compact assembly language .COM programs to make them small, fast and efficient. This means that many of the programs do not include built-in configuration options. However, if you're experienced with DEBUG, you can 'patch' the programs to customize their operation. The manual for each program will describe the ways in which it can be customized but typically you can do so to: * Customize the screen colors the program uses (if the display is hard to read on your screen). * Change the 'hotkey' used by one of the TSR programs to avoid a conflict with your other software. * Change defaults such as sorting order, size of records and so on. To customize a utility, follow this general procedure in conjunction with the manual for the program. (You SHOULD NOT ATTEMPT this if you are not confident about using DEBUG as a mistake may stop the program from working or even crash your PC.) 1. Always MAKE A COPY of the .COM file for the program in question as a back-up. For example, enter COPY POP-CAL.COM ORIGCAL.COM 2. Start DEBUG with the name of the program to modify. You must have the DOS DEBUG program available for this to work. For example, enter DEBUG POP-CAL.COM DEBUG loads the file and presents a - prompt. 3. Use the DEBUG E command to modify the areas of the program as described in its documentation. For example, the hotkey for POP-CAL can be changed by entering a new keyboard scan code at location 174. If we wanted to use Alt-P rather than Alt-C we can see from the scan code (SS) table below that we need to change this to code 19. This can then be entered in DEBUG with: E174 19 4. After making all the necessary changes, save the file back onto disk with the W command. Enter W 5. Now leave DEBUG. Enter Q 6. Now load and test out the new program. If it no longer works, delete it, restore your back-up copy (e.g. COPY ORIGCAL.COM POP-CAL.COM) and then try again. The tables below list the values necessary for customizing colors and hotkeys. Keyboard scan codes for alternative hotkeys (Values for SS) ----------------------- Scan Scan Key Code (hex) Key Code (hex) -------- ---------- --------- ---------- Esc 01 Z 2C 1 ! 02 X 2D @ 2 03 C 2E # 3 04 V 2F $ 4 05 B 30 % 5 06 N 31 ^ 6 07 M 32 & 7 08 < , 33 * 8 09 > . 34 ( 9 0A ? / 35 ) 0 0B R Shift 36 _ - 0C PrtSc * 37 + = 0D Alt 38 Bkspace 0E Spacebar 39 Tab 0F CapsLk 3A Q 10 F1 3B W 11 F2 3C E 12 F3 3D R 13 F4 3E T 14 F5 3F Y 15 F6 40 U 16 F7 41 I 17 F8 42 O 18 F9 43 P 19 F10 44 { [ 1A NumLock 45 } ] 1B ScrlLk 46 Enter 1C 7 Home 47 Ctrl 1D 8 UpArr 48 A 1E 9 PgUp 49 S 1F - 4A D 20 4 LArrow 4B F 21 5 4C G 22 6 RArrow 4D H 23 + 4E J 24 1 End 4F K 25 2 DnArr 50 L 26 3 PgDn 51 : ; 27 0 Ins 52 " ' 28 . Del 53 ` 29 SysReq 54 L Shift 2A F11 57 | \ 2B F12 58 Shift Mask codes for alternative hotkeys (Values for MM) ----------------------- Value Alt Ctrl L-Shift R-Shift ----- --- ---- ------- ------- 0 1 X 2 X 3 X X 4 X 5 X X 6 X X 7 X X X 8 X 9 X X A X X B X X X C X X D X X X E X X X F X X X X X signifies that this key must pressed. For example, to use Left Shift and Right Shift for the hotkey, the value to use for MM would be 3. Color values ------------ Black 0 Blue 1 Green 2 Cyan 3 Red 4 Magenta 5 Brown 6 Lt Gray 7 Dark Gray 8 Lt Blue 9 Lt Green A Lt Cyan B Orange C Violet D Yellow E White F A full color value is two hex digits, the first for the background color and the second for the foreground. For example, bright white on a dark blue background is 1F. Do not choose light colors (values larger than 7) for the background as it will produce a blinking display in most of the programs. @@PC MagNet About PC MagNet PC Magazine's On-Line Reader Service ------------------------------------------------------- PC Magazine operates PC MagNet, a 24-hour-a-day interactive on-line service where you can download the latest versions and source code to these, and other, PC Magazine utilities. PC MagNet is just a part of ZiffNet, hosted on CompuServe, offering a vast range of resources, including weekly news from PC Week, product reviews index, Buyers' Market and the chance to share opinions and get help from, or give help to, other readers. How to access PC MagNet ----------------------- 1. Set your communications software and modem to 300, 1200, 2400 or 9600 bits-per-second (BPS or baud), 7 data bits, even parity, 1 stop bit and full duplex. 2. To find the number nearest you, call 800-346-3247. When the modem connects, press Enter. At the Host Name prompt, enter PHONES. Follow the menus, note the number closest to you then hang up and dial the number you've just found. (In Canada, dial 800-635 6225 voice only for your closest number.) 3. To obtain the latest PC Magazine utility without ZiffNet connect charges, at the HOST NAME prompt, enter CIS. At the USER ID prompt, enter 60116,1. At the PASSWORD prompt, enter PCMAGUTIL. 4. To join ZiffNet, at the HOST NAME prompt, enter CIS. At the USER ID prompt, enter 177000,5000. At the PASSWORD prompt, enter PC*MAGNET. Finally, at the ENTER AGREEMENT NUMBER prompt, enter Z11D9200. Now follow the instructions displayed for opening your own account. 5. Existing CompuServe members may join by typing GO PCMAG at any CIS prompt. 6. ZiffNet membership costs $2.50 per month. PC MagNet per hour costs $6.30 for 300bps, $12.80 for 1200 or 2400bps or $22.80 for 9600bps based on 1-minute increments. @@ALIAS ALIAS Douglas Boling and Jeff Prosise DOS command editing, recall and aliasing ------------------------------------------------------- Purpose ------- A TSR utility that enables DOS command-line editing and recall of previously issued commands and that permits assignment of long commands and environment strings to short synonyms ("aliases") or function keys. Format ------ ALIAS [?][/U][/D][/E][/L][/F [d:][path]filename] [/Bnn][/M nn][/S nn][alias [command]] Remarks ------- When loaded without any of its optional switches, ALIAS reserves a buffer size of 512 bytes for user-entered alias strings and a command stack that permits recalling the last 16 commands issued. These defaults (/B 512 and /S 16) can only be changed at load time. At this time, too, the /F switch can be used with a filename (plus drive and path) containing regularly used aliases (see Note). Previously issued commands can be recalled to the command line with the Up and Down Arrow keys. When many commands are stacked, typing a few initial letters before hitting the recall key will speed retrieval by skipping commands that do not match the typed pattern. Use the optional /M nn switch, where nn is a number, to set a minimum length of command strings to be stacked. The default, /M 1, remembers all commands. Whether recalled or newly typed, command-line entries can be edited when ALIAS is loaded. The Left and Right Arrow keys move the cursor by character; Ctrl-Left and Ctrl-Right move by word; and Home and End go to the line ends. The Del and Backspace keys delete characters; Ctrl-Backspace deletes the word at the cursor; and Ctrl-End deletes to the end of the line. Pressing Esc clears the command line and returns to the bottom of the command stack. The Ins key toggles between overstrike (the default) and insert mode for character entry on the command line. The command ALIAS alias [command] is used to define an alias or command synonym. The alias variable may be any one-word alphanumeric string; the command variable may contain multiple words and must end with a carriage return. Defining an alias but omitting the command variable removes a previous alias assignment. Function keys and their Alt-, Shift-, and Ctrl- combinations may be used in place of alias by being designated thus: [Fn], [AFn], [SFn], [CFn], with 1 to 10 as the values of n. An asterisk after the close bracket (for example, [F1]*) causes immediate command-string execution when the function key is pressed; otherwise, Enter must also be pressed. The command variable may include replaceable command-line parameters, (for example, %1), as in batch files. Environment strings, such as the PATH string, may be used in the command variable by being placed between a pair of % signs. A list of active aliases can be obtained at any time by entering ALIAS with its /L switch. Alias processing can be temporarily disabled with the /D switch and reenabled with the /E switch. ALIAS ? brings up a help screen. The /U switch uninstalls ALIAS from memory, when possible. Note ---- A plain ASCII file containing regular user-defined aliases may be installed with the /F switch when ALIAS is loaded, as, for example, ALIAS /F C:\BIN\MYALIAS.TXT This file may be up to 32K and may also contain ALIAS optional switches. Note that // and /* may be used to add comments on the remainder of a line and that blank lines are not processed. @@ATTR ATTR Charles Petzold Display or set file attributes ------------------------------------------------------- Purpose ------- ATTR permits display and modification of the archive, system, hidden, and read-only file attributes. Format ------ ATTR filespec or ATTR [+A|-A] [+S|-S] [+H|-H] [+R|-R] filespec or ATTR Remarks ------- Entering ATTR without any parameters, as in the last format shown above, produces a help display that shows which file attributes can be changed. ATTR permits the use of the global ? and * characters. Entering ATTR filename displays a specific file's attributes. For example, ATTR IBMBIO.COM returns the display IBMBIO.COM Arc Sys Hid R-O showing that the Archive, System, Hidden, and Read- Only bits of the attribute byte are set for this file. When wildcards are used to list the attributes of all the files in a directory, subdirectory names are shown as Dir (between the Arc and Sys in the example above). Unlike the DOS DIR command, ATTR lists hidden files, whether sought by specified filename or through a *.* listing. However, ATTR does not show Volume names or the dot and double-dot entries in subdirectories. The syntax for changing file attributes is indicated in the second format above. After typing ATTR (and a space) you simply precede the file specification with a plus or minus sign, followed by the letter A (Archive), S (System), H (Hidden), or R (Read-Only). A plus sign turns on the specified attribute; a minus sign turns it off. More than one attribute can be changed at once and the attribute-designating letters may be entered in any order in upper- or lower case. No space may be used between the plus or minus and the letter that follows it, however. Example ------- To convert the file 85TAX.WKS to hidden and read-only, you would enter ATTR +H +R 85TAX.WKS Since DOS itself normally sets the Archive bit, entering ATTR 85TAX.WKS would produce the display 85TAX.WKS Arc Hid R-O Since the Hidden attribute has been set, however, the DIR command will produce the message, "File not found." And since the Read-Only flag has also been set, a DEL command will produce the message, "Access denied." Notes ----- 1. Requires DOS 2.0 or later. @@BAC BAC John Dickinson Backs-up files to multiple floppies ------------------------------------------------------- Purpose ------- Backs up all (or selected) files in a directory to hard or floppy disks, permitting disk changes when target disks become full. Format ------ BAC [d:][path]filename[.ext] [d:][path] Remarks ------- Unlike the DOS COPY command, BAC permits you to change (formatted) target disks when backing up files to disk. Furthermore, it only backs up files whose date stamp is later than those of identically named files on the target disk. Unlike BACKUP, BAC does not change the setting of the archive bit. Also, files copied with BAC are fully usable at all times; they do not need first to go through a RESTORE process. BAC supports the use of global (* and ?) characters in filenames and extensions. It does not, however, permit you to REName files during copying. Examples -------- You are working at a PC/AT with a hard disk drive (C:) on which you keep your copy of BAC, and you want to back up all the .DOC files stored on a 1.2-Mb floppy disk (drive A:) onto regular 360K disks (drive B:). Since these .DOC files will require approximately 600K, you must have two formatted blank floppy disks ready to use in drive B:. From the C> prompt you enter BAC A:*.DOC B: When the first target disk in drive B: is full, you will be prompted to change disks. Notes ----- 1. BAC compares the date stamps of identically named files and will not overwrite a newer version with an older one. This may cause files to be skipped if you omit to keep your date/time current. 2. Requires DOS 2.0 or later. @@BAT2EXEC BAT2EXEC Douglas Boling Compile batch files to COM files ------------------------------------------------------- Purpose ------- Compile your batch files for added speed. Large batch files often run annoyingly slowly. Compiling them with BAT2EXEC will increase both your productivity and satisfaction. Daily PC operations are almost unimaginable without the use of batch files. Everyone has his favourite collection of them and some users have constructed complex batch files of thousands of bytes that push the batch language itself to its limits. Programs that expand the available batch file functions, such as Michael Mefford's BATCHMAN, encourage users to make even larger batch files. Unfortunately, however, batch files are also notoriously slow. It can be almost painful to watch them scroll down the screen a line at a time. A standard way to improve the speed of interpreted programs, such as batch files, is to compile them. That's where BAT2EXEC comes in. Using BAT2EXEC -------------- The full syntax for BAT2EXEC could hardly be simpler. Just enter: BAT2EXEC FILE.BAT where FILE.BAT is the name of your batch file. BAT2EXEC will then produce an executable .COM file with the name FILE.COM. If BAT2EXEC can't find the batch file, an error message will be printed. If BAT2EXEC can't understand a line in the batch file, it will print an error message indicating the line in the file in which it discovered the error. BAT2EXEC should not be used on every batch file. AUTOEXEC.BAT, for example, must remain a genuine batch file in order for COMMAND.COM to find it. Similarly, batch files that run terminate and stay resident utilities (TSRs) should not be compiled. The reason for this limitation lies in the DOS memory management structure: if a TSR is executed from a program compiled by BAT2EXEC, the memory used by BAT2EXEC itself will not be made available to the system after it terminates. Programs created by BAT2EXEC behave slightly differently from the batch files from which they were compiled. The .COM file does not echo each line to the screen as does the batch file, for example. Running other batch files does not cause the .COM program to end. Also, pressing Ctrl-Break does not present the message, "Terminate Batch file (y/n)." If Ctrl-Break is pressed and BREAK has been set on, the program simply terminates. The size of the resulting .COM file is somewhat larger than the batch file. Compiling a batch file containing a single REM statement results in a .COM file size of 68 bytes, illustrating the overhead of the setup and terminate routines. Program size increases quickly as routines are added then slows as the loaded routines are reused instead of new ones being added. Certainly, BAT2EXEC is not suitable for use on every batch file. Two and three line batch files are best left in their easy-to-alter and simple-to-understand ASCII format. However, for those batch files that have grown into long complex programs, BAT2EXEC is the answer. @@CDX CDX Michael Holmes and Bob Flanders Shortcut directory changer ------------------------------------------------------- Purpose ------- Provides an alternative to the DOS CD command that eliminates the need to enter long path and directory names and that finds and changes to directories containing specified filenames. Format ------ CDX [/?] [/B] [/+] [/F filename] [d:]p1 p2 ...pn Remarks ------- Entered without any of the optional / switches, CDX searches one or more hard drives d: for a specified directory p1. If found, the full path is displayed with a ? prompt and is selected by typing Y; typing N continues the search for another qualifying directory. If the d: parameter is omitted, only the current drive is checked; *: searches all hard drives, starting with the first hard drive in the system. Multiple drives listed as d:, including floppies (if requested) are searched in named order, e.g. DCAB:. If d: is preceded by a minus sign (-) the drive(s) listed are excluded rather than included. The p1 target directory name can be truncated to as little as their initial letter. To prevent having to bypass an inconvenient number of qualifying directories at the ? prompt, multiple values of p, each separated by a space, can be used to construct an abbreviated path, which need not include all steps. If the initial p1 begins with a backslash (\) the search will be made from the root rather than the current directory. Using the /F switch limits qualifying directories to those containing a user-specified filename. The filename supports the * and ? DOS wildcards, and if all the subdirectories of d: are to be searched, p1 may be omitted or replaced by an asterisk (*). Supplying the /B switch automatically selects the first qualifying directory, eliminating the user prompt. The /+ switch causes floppy disk drives A: and B: to be included in the search. Executing CDX with no operands brings up a syntax help screen. In keeping with DOS conventions, entering CDX with a single dot, double dot, backslash or a single parameter that is the full name of a directory goes to the requested directory. An extension of this convention allows a disk name to be specified. For example, if you are currently on C: and you enter CDX D:\ABC you will be taken to the D: drive ABC directory. CDX can be forced to search by placing a * at the end of the parameter. @@COMPUTE COMPUTE Michael J. Mefford Command line calculator ------------------------------------------------------- Purpose ------- A five-function calculator (addition, subtraction, multiplication, division, and modulo functions) that works directly from the DOS command line prompt. Format ------ COMPUTE arithmetic expression Remarks ------- COMPUTE accepts decimal numbers only, and the operators in its arithmetic expression are +, -, *, /, and %. Note that the % symbol does not stand for percent, but rather designates the modulo operator, which returns the remainder of an integer division. (Example: COMPUTE 8 % 5 returns the value 3, since 5 goes into 8 once with a remainder of 3.) When working on real numbers with a fractional part the modulo operator in COMPUTE rounds off the operands before the division. The standard order of precedence for arithmetic operations is followed by default. Multiple levels of parentheses and/or square brackets are supported, however, so that the order in which calculations are made can be modified. Thus, while COMPUTE 4 + 5 * 2 returns the value 14, the command COMPUTE (4 + 5) * 2 returns 18. COMPUTE stores its last calculated result within its own .COM file. This number, designated x, can be recovered and used in the next calculation, whose result becomes the new x. The value of the currently-stored x can be seen by entering the command COMPUTE x, and x can be used as an operand, as in COMPUTE x + 5. The program can handle decimal numbers up to 20 digits on either side of the decimal point. Rounding errors are precluded by using a binary coded decimal (BCD) format. Under DOS 3.x and later, COMPUTE can be renamed to a shorter name to save keystrokes. Under DOS 2.x, however, the program cannot be renamed and must be stored either in the current directory or in one designated in a PATH= statement. @@CONCEAL CONCEAL Michael J. Mefford Hide files and blank the screen for security ------------------------------------------------------- Purpose ------- Provides file security through password protection of selected files and a screen-blanking system activated either by a hotkey or by a period of keyboard inactivity. Most options explained below have ON and OFF states (default on) that may be entered with the parameters. Format ------ CONCEAL [/P password] [filespec] [options] Remarks ------- CONCEAL is normally loaded as a TSR requiring approximately 1K of RAM, via the AUTOEXEC.BAT line CONCEAL /S Files are then protected with the command CONCEAL filespec /S This applies the DOS System attribute to the filespec, making it invisible to DOS. CONCEAL then monitors and fails any attempts to remove the System attribute, and any DOS calls to open, delete, rename, or change the file attribute of protected files unless the proper password is supplied. Legitimate access is provided by the command CONCEAL /P password filespec /S OFF This turns off the filespec System attribute, which must later be reapplied. (The /F option allows password-access without removing the System attribute, but may not work with all applications.) The default password SHAZAM can be changed with the /N parameter option. Other file attributes (Archive, System, Hidden, Read-only) can be changed with the /A option: CONCEAL /A filespec [+|-A] [+|-S] [+|-H] [+|-R] Hardware screen blanking is provided by entering CONCEAL /B nn where nn is a number of minutes (0 - 60). The default is 3 minutes, and a value of 0 for nn turns blanking off. The /G option may be entered instead of /B to provide a bouncing ball instead of a blank screen display. Instant blanking is achieved with a hotkey (default Alt-Z), which may be changed to any Alt- or Ctrl- alphanumeric key with the /H option. From graphics mode, the /G option defaults to /B. To blank over graphics applications such as Windows, use the /O parameter. Adding the /T switch will require password entry rather than a simple keystroke to terminate screen blanking. The /U switch uninstalls CONCEAL. @@DDIR DDIR Charles Petzold Double directory listing ------------------------------------------------------- Purpose ------- Displays all (or selected) directory entries in double columns, sorted in alphabetical order. Format ------ DDIR [d:][path][filename[.ext]] Remarks ------- If no parameters are specified, DDIR will list all files in the current directory. Use of the global characters ? and * in the filename and extension parameters is supported. If more than one screenful (50 entries) is required, the display pauses at the bottom, showing the message, "Press any key to continue." Notes ----- 1. Because DDIR loads a secondary command processor, it will not operate under the Run option of WordStar and possibly with some other programs that normally allow calling up external programs. For the same reason, it cannot be automatically reinvoked using the F3 key when at the DOS command level. 2. Requires DOS 2.0 or later. @@DOC DOC Documentation viewer and printer version 1.1 ------------------------------------------------------- Purpose ------- DOC is a simple on-disk documentation viewer to present the manuals for the programs on this disk. It displays a list of available documents down the left side of the screen and shows the text of the currently selected document on the right. DOC has a simple printing ability which will produce a neat printout of a document so that you can have a manual to hand while working with a program. Running DOC ----------- To start DOC, enter the command DOC. If you're looking for a particular manual, you may also give it at the command line. For example: DOC CDX starts DOC and asks it to look for the manual for the CDX program. To select documents, use the up and down arrow keys to move through the list on the left. Typing the initial letters of a document name will jump directly to the next matching document. Once you've found the document you want, press TAB or the right arrow key to move to the text of the document on the right. The cursor keys (Home, End, Up, Down, PgUp, PgDn) will now move through the text. Press the left arrow or TAB key again to go back to select other documents. The DOC menu ------------ To call up DOC's menu, press the ESC key. DOC presents various options which you can select with the cursor and Return keys or by pressing one of the highlighted letters. The options will vary depending on your PC's configuration and the document files available. Pressing ESC a second time cancels the menu. Quitting DOC ------------ Choose the Quit option from the menu to leave the DOC program and return to DOS. Color Display Off ----------------- Choose Color display off from the menu to ask DOC to work in black-and-white. You may wish to do this if you're using a laptop with an LCD screen that doesn't show colors well or with some greyscale or CGA composite video monitors. If you need to do this, you might also enter the DOS command MODE BW80 before running DOC. This makes DOC and many other programs start up in black-and- white. Adding /M to the DOC command at the DOS prompt also forces monochrome operation. This menu option does not appear on PCs that do not have a color capability. Extended screen on ------------------ Choosing this menu option switches the display to 43 or 50 lines so that you can see more text without scrolling. You can go back to the normal display by choosing Extended screen off subsequently. If you have a Super VGA display card and a program to set extended text modes, such as 60 lines deep, you might like to try setting an appropriate mode before starting DOC. DOC will usually operate with the non-standard format. This menu option is only available on EGA or VGA equipped PCs. Fast screen on -------------- This menu option only appears on PCs fitted with CGA standard or equivalent displays. Normally the DOC program deliberately slows down on this type of display to prevent the screen flicker or 'snow' that genuine IBM CGA displays (and some compatible makes) can suffer from. If your system does not suffer from snow, choose 'Fast screen on' for a faster screen display. There's no harm in trying this option either way on your PC... snow does no harm and you might prefer to have a fast display that flickers to a slow one that doesn't. Print Document -------------- Choose this menu option to print the currently selected document. A menu appears from where you can make four print settings, choose Go to start printing or Cancel to return to viewing documents. You may need to alter the settings to suit your system before choosing Go as follows: 1. Output port This is the printer interface that DOC should print the document to. By pressing O you can step through the ports fitted to your computer. The default LPT1, the first parallel printer port, is correct for most PCs. DOC can work with a serial printer (COM1 or COM2) if you have one but you must make sure that the port is correctly set up (e.g. with a command such as MODE COM1:9600,n,8,1,p) BEFORE running DOC. X-On/X-Off handshaking is automatically provided for serial printers. You can set the output port to "FILE". In this case, DOC will ask for the name of a disk file when you start printing and will then print to disk rather than to a printer. If the file you name already exists, DOC will append pages to it. Note that DOC will not print on PostScript printers. If you have one of these, you might like to use the print to FILE option and then use a PostScript conversion program or word processor to print the resulting file. 2. Lines per page This is the number of printable lines on each page on your printer. DOC will print with this set incorrectly but will not be able to put page breaks and headers in the right place. The default is 66 lines for standard fan-fold paper. Other common values are 60, 62, 64 and 70. If you have difficulty with this setting, a workaround is to set the form-length correctly on your printer, enter a small number of lines per page (e.g. 60) and then select the "Use form-feeds" option. 3. Use form-feeds Set this option to Yes if you're using a LaserJet- style printer or any printer with the form-length set correctly. DOC will work with this option set to No by counting output lines but this is slower. 4. Pause between pages Set this option to Yes if you're feeding single- sheets to the printer... DOC will pause for you to get the next sheet ready between each page. Working with document files --------------------------- Document files should be kept in the same directory as the DOC.EXE program. Under DOS 3.0 or later, DOC will find the files when it starts no matter which drive or directory is current (with older versions of DOS, you should change to the relevant drive and directory before starting DOC). Multiple document files ----------------------- You can, if you like, place more than one document file in the DOC.EXE directory. DOC will display a menu of available files when first started and offer a 'Select document file' option on its menu to let you switch between documents. You can start DOC with a particular document file from the command line by entering its name. For example: DOC MANUALS2 You can also search for a particular program. If you enter a command such as: DOC SNIPPER DOC will search each document file in turn looking for a SNIPPER document. If you know which document file the document you want is in, you can reduce the search time by telling DOC on the command line. For example: DOC MANUALS3 SNIPPER @@DSCAN DSCAN Based on a program by Charles Petzold Scans for bad sectors on a disk Version 1.0 ------------------------------------------------------- Purpose ------- Locates and identifies disk errors on hard and floppy disks. Format ------ DSCAN [d:] Remarks ------- Bad sectors on a disk can cause loss of data but, as standard, DOS provides no tools to check for them. The DOS FORMAT command detects bad sectors initially -- and flags them in the disk's FAT (file allocation table) so that they won't be used -- but bad sectors can develop long after formatting. The RECOVER command will lock out bad sectors but is only used after damage has been found. The CHKDSK program only checks a disk's directory structure and FAT for consistency... it does not read through file data. DSCAN simply reads every sector on a disk in turn checking for errors. Regular use can provide advance warning that a floppy has developed a faulty area or that a hard disk is beginning to go bad. DSCAN does not attempt any repairs (it only ever reads a disk and does not write to it) but it's enough to warn you of potential problems or to check that a floppy you have prepared for someone is readable. DSCAN messages -------------- DSCAN reads blocks of sectors on the disk. If a read fault occurs, it goes back and reads each sector in the block individually to determine the nature of the fault. Its messages include... Problems with scanning ---------------------- Unknown Media: Disk format unrecognized: Unknown Unit: DSCAN cannot identify the type of drive it has been asked to scan and can't work with it. These messages may be produced if the disk's boot sector is damaged but, if the disk appears to operate correctly, it is more likely that DSCAN is not compatible with the type or format of the disk in question. Can't Read FAT: DSCAN can't read the disk's FAT in order to check where faults are. This message may occur if there are bad sectors in the FAT area. DSCAN will continue to operate if it can but will not be able say if bad sectors are already flagged, are free or lie within files. Type of fault ------------- CRC Error: Data checksum as recalculated during read does not agree with checksum stored on disk when written. Sector Not Found: Sector boundary created during formatting is no longer readable. Read Fault: General Failure: The sectors so designated are bad, but the errors reported don't fall into any of the above categories. Location of fault ----------------- File Alloc. Table: The bad sector is in the FAT which will prevent access to some files or directories. This is a serious problem, particularly if a large number of sectors are affected and should be investigated further. Boot Sector: The first sector of the disk is bad. Typically, if this is the case, neither DSCAN nor normal programs will be able to recognize the disk at all since it stores information about the format of the disk. A damaged boot sector on a hard disk can sometimes be repaired by running the SYS command from an original DOS master floppy, at least for long enough to copy valuable files off the disk. The drive may have to backed-up and reformatted or even repaired or replaced if the problem persists. Root Directory: Errors here could keep you from later being able to load a file or save updates to it. CHKDSK will probably indicate unallocated cluster chains or cross-linked files, and you may have to use CHKDSK/F to save what you can. Unallocated: A bad sector has been found in a currently unused area of the disk. An "Abort, Retry, Ignore?" will be produced if in future DOS tries to save a file to this area. DSCAN does not lock out the bad sector. Used by file: A bad sector has been found which is in one of your files. While DSCAN checks that the fault lies within a file, it does not determine the name of the file. You may be able to identify the file by using the COPY command to read through your files. For example, COPY *.* NUL When COPY encounters the file with the bad sector it will report "Abort, Retry, Ignore." Note the bad file and press "I" to continue. NUL is the name of DOS's NUL device so that the copied data is simply thrown away. Notes ----- 1. Requires DOS 2.0 or higher. 2. DSCAN may not operate with all types of drives... network drives and those that require special device drivers to operate are typical examples. 3. DSCAN is based on the original DISKSCAN program by Charles Petzold @@FFF FFF John Deurbrouck File finder version 1.0 ------------------------------------------------------- Purpose ------- A file and directory-finding utility that can search all directories on any or all drives for one or more target filespecs. Extended wildcards, size and attribute-byte information, and multiple report formats are supported. Format ------ FFF [/a] [drive(s):] [/d|do] [/h|ho|hro] [/s] [/l|t|w] name(s) Remarks ------- The name(s) parameter may consist of multiple entries (separated by spaces) on the same command line. Thus, FFF *.exe *.com *.bat will find all executable files on the current (default) drive. In FFF the * stands for 0 to n characters, the ? for one and only one character; the period is treated specially as an ordinary character. Thus *.* and * both mean "all files," and *.?* restricts a listing to files that have at least a 1-character extension. Combinations such as *C*T*.* are permitted, facilitating finding files with a basename that has (in this case) a C and a T in that order. All other parameters are optional and are not sensitive as to case or entry order. The /a switch causes FFF to search all system drives in alphabetic order. One or more drives may be specified, singly, in ranges, or intermixed, by entering a drive(s): parameter. This parameter must end with a colon, and included range(s) of drives (e.g. c-e:) must begin with the lowest letter drive in the group. By default, searches begin from the root directory of the drive(s) specified; the /s switch restricts the search to the current subdirectory and its children. The /d switch returns directories as well as files that match name(s); /do lists matching directories only. The /h switch adds hidden and system files; /ho restricts the listing to hidden and system files; and /hro reports hidden, system, and read-only files in addition to normal files. The default FFF report lists files and directories found under their parent directories and supplies file size, date and time, and attribute byte (archive, hidden, system, read-only) information on each. File size and allocation size totals are also supplied and a storage efficiency percentage is calculated. The /w (wide) switch reports entries individually, five across. The /l (limited) switch lists number of entries and total and allocated filespace. The /t (terse) switch reports fully-qualified names only. @@FREE FREE Based on a program by Art Merrill List disk free space version 1.0 ------------------------------------------------------- Purpose ------- FREE reports the amount of free space, the amount of space used and the total space on one or more disk drives. This information is also reported by the DIR and CHKDSK commands but where a large number of files are present, FREE is much faster. Format ------ FREE [d:] [d:]... or FREE dd... Remarks ------- FREE is in many respects a companion program to FSIZE, the latter tells you how much storage space you must have to make your copies, the former tells you how much you do have. Unlike most DOS commands, you do not have to include the : after drive letters or even separate them with spaces. FREE C: D: is equivalent to FREE C D or even FREE CD. If you give more than one drive letter, FREE prints totals for the drives listed; if your hard disk is divided into C D and E partitions, FREE CDE will list the space on each partition and then the drive as a whole. Notes ----- 1. Requires DOS 2.0 or later. 2. This version of FREE updates the original PC Magazine FREE.COM written by Art Merrill @@FSIZE FSIZE Based on a program by Art Merrill List file sizes and space occupied version 1.0 ------------------------------------------------------- Purpose ------- Calculates the storage requirements of a file or group of files based on the number of DOS clusters necessary to make floppy disk and hard disk copies. Format ------ FSIZE filespec or FSIZE filespec d: Remarks ------- DOS stores files in fixed-length 'allocation units' or 'clusters'. For floppy disks, the cluster size is usually 1024 bytes (two 512-byte sectors). A standard XT 10Mb hard disk has a cluster size of 4096 bytes (eight 512-byte sectors). AT hard disks typically have a cluster size of 2K (four 512-byte sectors). The cluster size is determined when the disk is formatted; larger clusters may be used on some drives, particularly large capacity units. The cluster size dictates how much disk space a file takes up. For example, with a 2K cluster size, a one byte file will still take up 2K (2048 bytes); the same space as a 900 byte file or a 2048 byte file. DOS always stores files in a multiple of the cluster size, if necessary padding out the last sectors of the file with random data. Entered with a file specification, FSIZE lists the total size of the files given and the space they actually occupy on the disk. It also notes how much space is 'lost' to padding data and what the cluster size is on the drive holding the files. Underneath, FSIZE lists how much space would be required for the files on different types of disk. For example, if the files are currently on a hard disk, you can see how much free space is needed to copy them onto a floppy disk. Similarly, if the files are on a floppy, you can see how much space they will take up if you copy them to a hard disk. If you give a drive letter after the filespec, FSIZE determines the cluster size on that drive and reports how much space would be taken up by the files if they were copied to it, rather than producing a table of various values. Examples -------- FSIZE *.* Lists how much space all the files in the current directory take up and produces a table showing how much space they would take up on disks with different cluster sizes. FSIZE A:*.PCX Lists how much space the PCX files on drive A take up. FSIZE C:\JAN Lists how much space files in the \JAN directory on drive C take up. FSIZE ACCOUNTS.WK1 B: Lists how much space the file ACCOUNTS.WK1 takes up and how much free space would be needed to copy it onto a floppy in drive B. Note that drive B (or whatever) must be ready for this to work as FSIZE needs to read the disk in the drive to determine its cluster size. Notes ----- 1. Requires DOS 2.0 or later. 2. From DOS 4 on, you can determine the cluster size on a particular drive with CHKDSK. You can do this with FSIZE and any version of DOS by running it with the name of any file on the disk. 3. If you are using FSIZE to determine the space needed to copy files, bear in mind that disk space is required to hold the directory entries for each file. If you are copying to the root directory of a disk, there is a fixed maximum number of files it can hold (typically 112 on a floppy). If you are copying files into sub-directories, DOS may fit the new directory entries into the existing sub-directory or it may need to extend the sub-directory by a cluster or two to cope. 4. FSIZE combines and updates the PC Magazine SIZE and ATSIZE utilities written by Art Merrill @@HC HUGECALC Neil Rubenking Long precision calculator ------------------------------------------------------- Purpose ------- A command-line calculator utility that can perform addition, subtraction, multiplication, division, exponentiation, and factorial functions on numbers with up to 254 significant digits. Format ------ HC n operator [n] Remarks ------- The n operand variables may consist of any string of digits up to the 127-character maximum of the DOS command line. The operands must not include commas or other formatting punctuation, and must be separated from the command and the operator by at least one space. Two operands are required for all operations except factorial. The operators recognized are +, -, *, /, ^, and !. When output to the screen (the default) or redirected to a printer or other DOS device, HUGECALC prints the name of the function and inserts commas at every three digits in the numeric result. If the output is redirected to a file or piped to a program input, however, only the numeric result is sent. Note that when it accepts input from a file or via a pipe, HUGECALC uses that input as its first operand. Example ------- If a program that prints 10,000 permutations a second is asked to print all possible combinations of 13 characters, how long will it take? The command HC 13 ! | HC / 10000 | HC / 3600 | HC / 24 pipes the factorial of 13 (the possible combinations) to a second instance of HC, which divides it by 10,000 (the permutations per second). The result is piped to a third instance of HC, which divides it by 3600 (the seconds in an hour), and finally to a fourth instance of HC, which divides it by 24 (the hours in a day). The answer printed on the screen is: QUOTIENT: 7 REMAINDER: 4, that is, 7 days, 4 hours. Note that all such chained calculations must be strictly sequential and that parenthetical expressions are not supported. @@KEY-FAKE KEY-FAKE Charles Petzold Simulates keystrokes within a batch file ------------------------------------------------------- Purpose ------- Supplies the series of keystrokes needed to initialize an application program on boot-up. Format ------ KEY-FAKE ["xyz"] [nn] [0] [@F] ProgramName Characters typed within a pair of single or double quotes ("xyz") are normal ASCII-character keystrokes. Numbers (nn) not in quote marks are ASCII decimal codes, e.g., 13 (Enter), 26 (Ctrl-Z), or 27 (Esc). Numbers preceded by @ are the extended ASCII decimal codes (128 through 255) generated by the Alt keys, cursor keys, Ins and Del keys, and the Function keys (e.g. @61 is the F3 keystroke). The 0 is used with programs that check the keyboard buffer (it tells such programs the buffer is clear, so the programs will treat the succeeding keystroke separately). Remarks ------- KEY-FAKE is of greatest use in batch files used to call up application programs. For example, to enter Lotus's 1-2-3 and set it for File Retrieve, the following .BAT file would be appropriate: CD \LOTUS KEY-FAKE 0 13 0 13 0 13 0 13 0 13 "/FR" LOTUS This takes you past the necessary initial carriage returns and /FR command without having to type them in each time. Similarly, if each time you enter BASICA you want to have a blue border, blue background, and yellow letters, you would create a batch file, B.BAT, containing the lines KEY-FAKE "COLOR 14,1,1" 13 "CLS" 13 BASICA Notes ----- 1. The keystroke sequence stored by KEYFAKE is limited to 124 characters and must be on one continuous command line. Keystrokes not supported by the PC BIOS (e.g. Alt-Home) cannot be stored. 2. Programs such as XyWrite II that get keyboard information directly from the hardware keyboard interrupt will bypass KEY-FAKE. KEY-FAKE will also not work well when you are on-line using a communications program. 3. KEY-FAKE is memory resident, but can be executed multiple times in the same session without reloading. However, if nested batch files cause it to be re-invoked before its initially stored keystroke sequence has been exhausted, the remaining initial keystrokes will be lost. @@LOCATE LOCATE Steven Holzner Searches for files containing word or phrase ------------------------------------------------------- Purpose ------- Searches all files in the current and the root directories of a drive for all occurrences of any specified sequence (e.g., a word or phrase) of up to 20 ASCII characters. Additional search paths and/or drives may be specified by using Option 1. Format ------ LOCATE searchstring Remarks ------- In addition to returning the path(s) and filename(s) of the file(s) in which the requested string is found, LOCATE puts searchstring into a context of up to 20 immediately surrounding characters. LOCATE is case sensitive; the string to be found must be typed exactly. The program does, however, strip "high-order" (non-ASCII) bits from searchstring, so it can be used, for example with WordStar document files. Option 1 -------- Normally, if LOCATE does not find the requested string either in the current directory or in the disk's root directory, it simply exits. It does not automatically search every subdirectory on every drive. You can extend the search range, however, by preparing a simple ASCII file that specifies additional paths and/or drives. The name of this file must be PATH.DAT, and it must be located in the root directory (usually C:\ for hard disks, A:\ for floppies). An example of such a PATH.DAT file would be \WORK \LEVEL1 \A: Each line in the PATH.DAT file must end with a carriage return and specifies an additional path (or drive) for LOCATE to check before it exits. The PATH.DAT file can be up to 300 bytes in length, and incorrectly specified entries are ignored. The use of Option 1 will, of course, slow down the overall speed of the search. Note ---- 1. Requires the use of DOS 2.0 or later. @@LOCK & UNLOCK LOCK (and UNLOCK) Steven Holzner File encryption and decryption ------------------------------------------------------- Purpose ------- LOCK encrypts a file, rendering it unreadable to anyone who does not know the user-chosen passphrase. Subsequently, using the same passphrase, UNLOCK will decrypt the file. Format ------ LOCK plainFile codeFile (to lock a file) then UNLOCK codeFile plainFile (to unlock a file) Remarks ------- The user-selected passphrase can be up to 64 characters in length; the programs prompt you to supply it. Files to be LOCKed and UNLOCKed must be less than 62K in length. If you do not supply new filenames for the locked and unlocked files, the programs use the default filename FILE.LOC. Example ------- You have a file of student course evaluations named CONFY on drive C: that you wish to mail to a colleague in encrypted form. You put a formatted floppy disk in drive A:, and at the C> prompt you enter LOCK CONFY A:CRIMSON When the program asks for a passphrase, you enter VERITAS. The CRIMSON file on the disk will be unreadable. When your colleague--who must, of course, be told the passphrase you have used--puts the disk in his machine, he types UNLOCK A:CRIMSON GUIDE When prompted, he supplies the passphrase VERITAS, and his file GUIDE will be identical to your original file CONFY. Notes ----- 1. LOCK and UNLOCK do not delete any files, original or encoded. 2. Requires DOS version 2.0 or later. @@LOG LOG Jeff Prosise Keeps a log of computer activity ------------------------------------------------------- Purpose ------- A memory-resident utility that automatically maintains a record of computer activity suitable for tax records, client billing, and usage analysis. Format ------ LOG [filespec] [/U] Remarks ------- Entered without the optional filespec parameter, LOG opens a file named USAGE.LOG in the root directory of the current drive. The user may over-ride any or all of the drive, path, and filename defaults by supplying his desired parameters as the filespec option when LOG is initially run. Although it can be executed from the DOS prompt, LOG is normally loaded by being included as a line in an AUTOEXEC.BAT file. Provided it is either the only or the last memory-resident program loaded, LOG can be uninstalled by executing the command with the /U parameter. After listing the date, LOG files provide a single-line column display of start, end, and elapsed times for each program run. The program name and any parameters entered with it are also logged, as is the "level" of DOS activity. The original DOS level is 0; a program running under DOS is level 1; invoking a secondary copy of COMMAND.COM by shelling out from the program to DOS, represents level 2, etc. LOG can track up to 10 levels of DOS activity. Time spent at the DOS prompt is identified as . LOG does not record the use of internal DOS commands (DIR, CD, REN, for example), nor command calls that fail ("Bad command or filename"). LOG produces pure ASCII files that can be TYPE'd to the screen or to a printer and that can be used with a browse utility or text editor. @@LPTPORT LPTPORT John Dickinson Swaps LPT1 and LPT2 over ------------------------------------------------------- Purpose ------- Permits alternate use of two parallel printers (e.g. letter- and draft-quality units) with software that is normally limited to using LPT1:. Format ------ LPTPORT Remarks ------- DOS and many programs print, by default, to the first parallel printer on the PC, known as 'LPT1'. The DOS MODE command will let you redirect LPT1 to a serial printer but it will not switch to another parallel printer. To use a second parallel printer in this case, LPTPORT provides a software toggle that interchanges the internal DOS I/O addresses of LPT1 and LPT2. After entering the LPTPORT command, a second printer, connected to LPT2 will receive program output nominally directed to LPT1. Entering the LPTPORT command a second time restores the original port assignments. Notes ----- 1. Certain internal print-spooling programs, such as those supplied with add-on memory board cards, read the port address assignments at boot-up time and do not thereafter look at the low-memory area of DOS to find them. With such programs you will have to run LPTPORT before the print spoolers are loaded in order to change the effective port assignments. @@NO NO Charles Petzold Exclude files from wildcard operations ------------------------------------------------------- Purpose ------- Excludes specified files in a subdirectory from the action of a command. Format ------ NO filespec command [parameter] Remarks ------- NO is designed for situations in which you want to apply a command such as DELete or COPY to all the files in a directory except one or two (or a class of) files. For example, NO *.BAS COPY *.* A: copies all the files in your current subdirectory to drive A: except for those that have a .BAS extension. To exclude more than one file (or category) you must use a separate NO command for each on the command line. Thus, NO *.ASM NO *.COM DEL *.* deletes all files in the current directory except those with .ASM or .COM extensions. Notes ----- 1. NO.COM should not be used in conjunction with the PC-DOS BACKUP and RESTORE commands. This is because NO operates by temporarily setting the "hidden" file attribute bit on the files to be excluded from the main command, then unhiding the files after the main command has been executed. Since the DOS BACKUP/RESTORE operation acts on hidden and unhidden files alike, NO.COM cannot be used to exclude files from BACKUP/RESTORE. RESTORE, indeed, will restore the supposedly excluded files as hidden, overwriting the originals. 2. While NO.COM provides full path support (and so requires the use of DOS 2.0 or later), it is a good policy when using NO to use CHDIR to make the directory that contains the files on which you wish to operate the current directory. For example, suppose you are in your root directory, one of whose subdirec- tories is \BASIC. If you were to enter the command NO *.BAS DEL \BASIC\*.* you would not delete all the files in the \BASIC subdirectory except those with a .BAS extension, as you might have intended to do. To do this from the root directory you would have had to enter NO \BASIC\*.BAS DEL \BASIC\*.* This complete filespec would tell NO that it had to protect files in the \BASIC, not in the current (i.e. root) directory. If you follow our recommendation and enter CD \BASIC NO *.BAS DEL *.* thus making \BASIC your current directory before you start deleting, you will then clean out all but the .BAS files, just as you intended. 3. Should a parity check error, power outage, or system crash occur during the brief period between the times NO hides and subsequently unhides the protected files, those files will subsequently seem to have disappeared. They are not lost; only hidden from a DIR listing. Use the DOS ATTRIB command or a similar program to remove their hidden status. @@ONEKEY ONEKEY Steven Holzner Simple keystroke macro creator program ------------------------------------------------------- Purpose ------- Reassigns a designated series of keystrokes to a user-selected keystroke. Format ------ BASICA ONEKEY (to make ONEKEY.COM) then ONEKEY (to load macro) Remarks ------- ONEKEY is a memory-resident keyboard macro program. While written in assembly language, it is presented here with a BASIC interface that need be run only once, but which facilitates entering the trigger keys you want to use and the sequences of keystrokes they will replace. ONEKEY will accept up to 30 different trigger keys, each of which will replace up to 50 keystrokes. When you load and run ONEKEY.BAS in BASIC, you will prompted to "Type the key to be replaced." This will be a key you use as a trigger: Ctrl-N, Alt-Z, F1, or the like. When you enter this key, you will be prompted, "The command that replaces this key is." Here you enter the string of keystrokes the selected trigger key will execute. Remember to include all necessary carriage returns, spaces, and control characters, just as you would enter them at the keyboard. When you type Ctrl-End (not a carriage return) to terminate this sequence, you'll be prompted for the next trigger key, and so on. When you have typed in as many macros as you want, type Ctrl-End when asked for a trigger key. The BASIC program will then create a ONEKEY.COM file, ready to be run. Once created, ONEKEY is a regular DOS command; you enter it at the DOS prompt (or as a line in your AUTOEXEC.BAT file), not from BASIC. Notes ----- 1. Memory-resident utilities such as ONEKEY are often incompatible with programs (XyWrite is one) that themselves take over the keyboard interrupts. You must simply experiment to see if ONEKEY can be used with your software. 2. ONEKEY.BAS is intended for use with IBM BASICA, Microsoft GWBASIC or a compatible version of BASIC. 3. Requires DOS 2.0 or later. @@PCBOOK PCBOOK Jay Munro Prints booklets on a LaserJet type printer ------------------------------------------------------- Purpose ------- Prints README and similar ASCII files in booklet format on an HP LaserJet II, IIp, or III printer. Uses two-sided printing in landscape mode, with Line Printer font so that four standard pages of 80 characters/line, 66 lines/page are printed on each sheet without formatting changes. Format ------ PCBOOK [path] filename [/F] [/P] [/D][/C] [/2] [/A] [/W] [/S] [/H] Remarks ------- The filename can designate any ASCII text file in which each line is terminated with a Carriage Return/Line Feed combination. Page Feed characters can be added to force breaks in addition to those implicit in the 60-line (68-line if a header is used) page length. Any or all of the /F, /P, and /D command-line switches can be used to create a one-line header that prints the filename, page number, and date, respectively, on all but blank pages. The /W switch causes lines exceeding 80 characters to wrap; by default such lines are truncated. Adding the /2 switch causes PCBOOK to print to LPT2 rather than the default LPT1. (Use the DOS MODE command to implement serial connection, if desired.) The /A switch can be used to direct output to a file. PCBOOK sequences the page printing so that all side-one pages are printed in one pass. The sheets are then put back in the LaserJet paper tray and all side-two pages are printed. The finished booklet can then be created with a single fold. When using the normal (top) LaserJet output bin the pass-one sheets should be reinserted in the paper tray without any relative change in orientation. If rear output from the printer is used, the sheets must be turned over as a group before reinsertion. To determine how many sheets will be required without automatically starting the print operation, use the /C switch. The /H switch provides on-screen help for the program, and the /S switch sounds a beep as each printing pass is successfully completed. @@PCSORT PCSORT Michael J. Mefford Fast general purpose sorting utility ------------------------------------------------------- Purpose ------- A fast and capable text sorting utility without the limitations of the DOS SORT command. Format ------ PCSORT [filename] [options] PCSORT command line summary: /Sn n=size of record in lines (1-9) Default=1 /Pn n=sort priority (1-9) Default=1 /R Sort current priority in reverse order Default = ascending /N Numeric sort current priority Default = Alphanumeric /L[n] Line sort: n=record sort line (1-9) default=1 default sort is a line sort /[B][+] nn [xx [y]] Block or column sort: nn=start column xx=width y=sort line (1-9) defaults: nn=1; xx=start column to end of line; y=1 /W [+|-] n Word sort: n=word count default = +1 - n = count from end of record /C Case sensitive sort Default = Case insensitive Shown above are the many switches you can use, either at the command line or within batch files, to configure PCSORT for your own needs. The options listed need be used only if you're using PCSORT as a filter -- in combination with the DOS redirection characters |, <, and >. A common example is piping DOS directory's output to a filter and redirecting the filter's output to a file. PCSORT menu command summary: PgUp/PgDn Next page Arrow keys Cursor Home(1) Beginning of column Home(2) Top of page Home(3) Top of text End(1) End of column End(2) End of page End(3) End of text Ctrl-Home Beginning of text Ctrl-End End of text Enter Beginning of next line F1 Displays all sort fields at a glance Alt-F1 Resets all the sort variables to defaults F2 Save file F3 New file F4 Sort text F5 Increase lines per record (1-9) Shift F5 Decrease lines per record /F6 Select next key priority (1-9) Shift F6 Select previous key priority} F7 Sort order (de/ascending) F8 Alphanumeric or Numeric sort F9 Select next Field type: Line, block, word or none Shift F9 Select previous Field type F10 Mark the record line for line sort or mark block sort field or select sort word count Shift F10 Reverse selection of word count Esc Exit PCSORT This listing of PCSORT's navigation keys demonstrates the program's versatility in sorting in up to 9 priority orders. Each priority can be set independently of the others. Key commands, in general, operate as you might expect. Note, however, the varied uses of the Home and End keys for travelling throughout the file; each key's role, here, depends on the number of times you press it. Customizing PCSORT ------------------ Some systems, especially laptops, do not display color contrasts very well. If you find PCSORT hard to read, you can force PCSORT to use black-and-white attributes by entering the command MODE BW80 before running it. The best way to do that is from a batch file, as shown: MODE BW80 PCSORT %1 %2 If you have a color system and PCSORT is using black and white attributes, chances are some other application has changed the video mode. To encourage PCSORT to use color, issue the DOS command MODE CO80 before running PCSORT. The following instructions will enable you to customize the colors used by PCSORT. Start by making a back-up copy of PCSORT.COM and then enter DEBUG PCSORT.COM You are now ready to modify PCSORT.COM. If at any time you make a mistake, you can abort the editing process by entering Q. The last two commands that you enter after entering any modifications are W Q for Write to disk and Quit DEBUG. Color scheme: Enter the following Debug instructions, replacing the xx with a hexadecimal color value. The default color values for the menu color, the text, and the block marker, and their respective descriptions are shown as comments to the right of the semicolons. Do not type in the comments. E 106 xx ; 71 Blue on light gray E 107 xx ; 17 Light gray on blue E 108 xx ; 31 Blue on cyan Alternate colors may be selected from the following list. The background color number is entered for the first x and the foreground color for the second x. Do not use a light color for the background, or the display will blink. Dark colors Light colors ----------- ------------- Black 0 Dark Gray 8 Blue 1 Lt Blue 9 Green 2 Lt Green A Cyan 3 Lt Cyan B Red 4 Orange C Magenta 5 Violet D Brown 6 Yellow E Lt Gray 7 White F For example, to change the Block marker color from blue on cyan (31) to blue on light gray (17), you would enter E 108 17 PCSORT turns on the border, and some monitors can not handle that. To disable the border, enter E 10C 1 Replace the 1 with a 0 to re-enable the border. Finish the DEBUG session with W Q @@PP PP Based on a program by John Dickinson Prints text files Version 1.0 ------------------------------------------------------- Purpose ------- Prints standard ASCII files of program listings, batch files or other text files in a standard formatted style with page breaks. Format ------ PP file(s) [/Ln][/Wn][/On][/Tn][/F][/H][/A][/D:dev] Remarks ------- PP neatly prints files with page breaks and, optionally, a header including the filename, the date and time it was created or last changed and the page number. Various options can be used to set the page size and other parameters to suit the file or your printer and paper. By default, PP prints 80 column wide lines and 66 lines to the page to LPT1, assuming a dot-matrix printer and standard fan-fold paper. You may print several files in one go by giving multiple filenames or using wildcards. Ctrl-Break will stop the program if necessary during printing. Options ------- /Ln Sets the number of lines per page. 64, 66 and 70 are common values. If the number of lines is not set correctly, PP will not start a new page at the correct place. /Wn Sets the width of pages, normally 80 /On Adds an offset of n spaces to every line to ensure the printhead is past the sprockets on a tractor fed printer or to leave space for binding /Tn Sets tab stops every n positions, normally 8. Use this if the file has been formatted with a different value such as 4 /F Uses form-feed characters to end pages. PP normally sends the relevant number of blank lines so that it will work even if the form length is not set correctly on the printer. Use /F if it is set or if you are using a LaserJet or similar printer. PP takes note of any form-feed characters already in the file regardless of this setting... provided you set a page length the same or larger than that used to format the file, you can print a pre-formatted file. /H Disables the header. Use this if the file being printed already has its own page headers. /A Outputs only ASCII characters, converting PC extended characters to near ASCII equivalents. Use this if your printer cannot handle the full PC character set. /D:dev Prints to the named device, usually LPT1, LPT2, COM1 and so on. You can give a filename here to print to disk or even use CON to print to the screen display. If you print to an existing file, PP appends the new output to it rather than replacing the old file. Notes ----- 1. If you're printing to a serial port, make the correct settings first with the DOS MODE command. Like DOS, PP does not provide X-on/X-off handshaking so your printer and cable must be setup for a hardware handshake or you may experience problems at higher baud rates. 2. PP always expands tabs to spaces on output so tab settings on the printer are ignored. 3. PP is based on John Dickinson's original PR program. @@PRSWAP PRSWAP John Dickinson ASCII-only filter for printer output ------------------------------------------------------- Purpose ------- Replaces IBM text-graphics characters in printer output with plain ASCII characters when using a printer that cannot print the full IBM PC character set. Format ------ PRSWAP Remarks ------- The IBM text-graphics characters (non-standard ASCII 176-223 and 254) programmers often use to make their screen displays look more attractive cannot be handled by many printers. PRSWAP.COM is a memory-resident program that translates these characters into presentable-looking ASCII substitutes. PRSWAP should be loaded only once until you power down or hit Ctrl-Alt-Del. If you intend to use it regularly, the best place to put it is in your AUTOEXEC.BAT file. @@PRUNE PRUNE Michael J. Mefford Reorganizes directories on a hard disk ------------------------------------------------------- Purpose ------- To organize a hard disk by renaming, removing, copying, and moving entire directories, together with their files and subdirectories. Directories may be put into other locations on their current or on another drive's directory tree. PRUNE also reports directory or branch size and permits directly calling up PC Magazine's DR and DIRMATCH utilities to inspect files or update directories with current file versions. Format ------ PRUNE [d:] [d:] Remarks ------- Entered at the DOS prompt without either of its two optional (d:) drive arguments, PRUNE displays a graphic directory tree of the current drive in both of its side-by-side windows. The d: arguments permit initial display of any one or two directory trees on the system. The active window, which has the highlight bar, can be toggled with the Tab key or with the Left- or Right-Arrow keys. The directory tree can be traversed with the Up-/Down-Arrow, PgUp/PgDn, and Home/End keys. Esc exits the utility. The operations PRUNE can perform on the highlighted directory are executed with the Function Keys. Note that except for the Rename Directory command (F3), "directory" here includes all directory and subdirectory files. Prompts and confirmatory warnings are provided as needed. F1 copies the highlighted directory to another location on the current tree or to one highlighted in the alternate window. F2 removes a directory, and should be used with special care. F4 moves (copies, then removes the original) a directory. F5 gives the size of a directory branch, including subdirectories, in terms of the bytes allocated to the clusters required. Although PRUNE will not copy or move directories where insufficient space exists, this information may be useful in deciding which directories to work on. F6 displays the same information for the directory files without including any subdirectories. F7 permits loading and displaying the tree of a new drive. F8 calls up the DR utility to permit reading the files in a directory, and F9 calls up DIRMATCH to permit updating a target directory with file versions from a more recent directory. Note that for F8 and F9 to work, these utilities must be on the DOS path. If using a floppy drive, COMMAND.COM must also be on it. Customizing PRUNE ----------------- Some systems, especially laptops, do not display color contrasts very well. If you find PRUNE hard to read, you can force it to use black and white attributes by entering the command MODE BW80 before running the program. The best way to do this is from a batch file containing the lines MODE BW80 PRUNE %1 %2 If you have a color system and PRUNE is using black and white attributes, chances are some other application has changed the video mode. To encourage PRUNE to use color, issue the following DOS command: MODE CO80 before running the program. Modifying PRUNE --------------- The following instructions will enable you to customize the colors used by PRUNE and to change the program run by pressing F7 DR. Start by making a back-up copy of PRUNE.COM and then enter DEBUG PRUNE.COM You are now ready to modify the utility. If at any time you make a mistake, simply abort the editing process by entering Q. The last two commands that you enter after entering any modifications are W Q for Write to disk and to Quit DEBUG. Color scheme: Enter the following DEBUG instructions, replacing the xx with a hexadecimal color value. The default color values and their descriptions are shown as comments to the right of the semicolons. Do not type in the comments. E 17B xx ; 71 Blue on light gray Menu color E 17C xx ; 17 Light gray on blue Inactive tree E 17D xx ; 31 Blue on cyan Menu bar E 17E xx ; 1F White on blue Active tree E 17F xx ; 17 Light gray on blue DR color Alternate colors may be selected from the following list. The background color number is entered for the first x and the foreground color for the second x. Do not use a light color for the background or the display will blink. Dark colors Light colors ----------- ------------- Black 0 Dark Gray 8 Blue 1 Lt Blue 9 Green 2 Lt Green A Cyan 3 Lt Cyan B Red 4 Orange C Magenta 5 Violet D Brown 6 Yellow E Lt Gray 7 White F For example, to change the bar color from blue on cyan (31) to blue on light gray (17) you would enter E 57A 17 PRUNE turns on the border, and some monitors can't handle that. To disable the border, enter E 185 1 g Replace the 1 with a 0 to re-enable the border. Reprogramming F7: Pressing F7 in PRUNE will run the DR.COM utility if it is found on your DOS PATH. To substitute a different utility for DR, enter E 192 "12345678" where 12345678 is the eight-character name of the utility you want to use instead. Make sure to include the quotes shown above, but do NOT add either the period or the extension (.COM or .EXE) of the alternative utility. Append spaces if the utility name is less than eight characters. For example, if you have a program named DirMagic you could enter E 192 "DIRMAGIC" The DR next to the F7 in the menu will not change, but DirMagic will be executed all the same. Remember that the new utility has to be in the DOS PATH. To change the F7 utility back to DR, enter E 192 "DR " Finish the DEBUG session with W Q @@PUSHDIR & POPDIR PUSHDIR & POPDIR John Friend Save and restore current directory ------------------------------------------------------- Purpose ------- This pair of programs provides a way to return automatically to your current directory after running programs that require directory changing. Format ------ PUSHDIR ... command(s) that run program or change directory ... POPDIR Remarks ------- While PUSHDIR and POPDIR can be entered directly from the DOS prompt, their primary application is in batch files. For example, suppose you create a file named 12.BAT that consists of the following four lines: PUSHDIR CD\LOTUS 123 POPDIR Suppose also that 12.BAT, PUSHDIR.COM, and POPDIR.COM are either in your root directory or in a subdirectory on the PATH specified in your AUTOEXEC.BAT file. Assume, finally, that you are currently in your word processing subdirectory (\WP), but need some information from a 1-2-3 spreadsheet. If you now enter 12 from the DOS prompt, PUSHDIR stores the \WP (your current directory) on its stack and DOS changes to the \LOTUS subdirectory and runs 1-2-3. When you exit from 1-2-3, you would normally be left in the \LOTUS subdirectory. A DOS CD command in 12.BAT after the 123 line could return you to a specified directory every time you terminated 1-2-3, of course. But POPDIR returns you to whatever subdirectory you were in when you invoked 1-2-3 -- in this case, to your \WP subdirectory. PUSHDIR can accommodate up to six levels of directories on its stack, permitting considerable programming flexibility in constructing batch files. Notes ----- 1. PUSHDIR and POPDIR require DOS 2.0 or later. @@RED RED John Dickinson Quickly moves files from one directory to another ------------------------------------------------------- Purpose ------- Transfers one (or more) file(s) from one subdirectory to another without requiring the use of COPY and ERASE. Format ------ RED [d:][path]filename[.ext] [d:][path] Remarks ------- Like the DOS COPY command, RED.COM supports the use of the global characters ? and * in specifying the desired source files. Unlike COPY, however, RED.COM does not permit renaming a file during the transfer process. (This is why it is unnecessary to supply a target filename.) Furthermore, RED requires that the source and target drives be the same. You cannot, therefore, remove a set of files from drive C: by trying to REDirect them to drive A:. Example -------- Before submitting your income tax you calculated it under several different methods, contained in files named ROUGH1.DAT through ROUGH6.WKS. These are all in the subdirectory \TAX on drive C:, and you want to move them all to a sub-subdirectory (which you have created) called \1992TAX\DRAFTS. From the C> prompt enter RED \TAX\ROUGH?.* \1992TAX\DRAFTS and all six files will be moved out of \TAX and into \1992\DRAFTS. Notes ----- 1. Requires DOS 2.0 or later. @@RENDIR RENDIR John Dickinson Renames a directory ------------------------------------------------------- Purpose ------- Permits renaming subdirectories directly, without creating a new directory, moving the contents of the old one into it, and then removing the old directory. Format ------ RENDIR [d:][path]oldname[.ext] newname[.ext] Remarks ------- DOS has always provided a REName command for filenames, but not for directories. A bug in DOS 3.0 permits you to use the immediate mode of BASIC to NAME olddir AS newdir but this bug has been removed from subsequent DOS versions. RENDIR.COM permits renaming directories in DOS 3.0 and later. While RENDIR allows you to change the name of a directory on another drive than your current one, it does not permit you to transfer a directory to another drive by RENDIRing it. Thus, for example, if you are on drive C: and have a directory on drive D: named \TAXES, from the C> prompt you can RENDIR D:\TAXES \TAXES92 You cannot, however RENDIR D:\TAXES C:\TAXES92 Furthermore, you should not use RENDIR to try to change the name of the subdirectory you are currently in. Notes ----- 1. Unlike RENAME, RENDIR does not support use of the ? and * wildcard characters. 2. Requires DOS 3.0 or higher. @@SNAPSHOT SNAPSHOT Steven Holzner Capture and later pop-up screens ------------------------------------------------------- Purpose ------- Saves your current screen and up to three additional prefabricated screens for immediate display without leaving an application program. Format ------ BASICA SNAPSHOT (creates SNAPSHOT.COM) SNAPSHOT (loads resident program) (stores current screen) (displays stored screen) (displays screen A.DAT) (displays screen B.DAT) (displays screen C.DAT) Remarks ------- SNAPSHOT is a memory-resident utility that is incompatible with programs (such as XyWrite) that take control of the keyboard interrupts. While written in assembly language, it is presented here with a BASIC interface that need be run only once but which facilitates entering the trigger keys you will use to store the current screen, recall it, and to recall up to three screens you can prepare with an ASCII word processor and store under the filenames A.DAT, B.DAT, and C.DAT. When you load and run SNAPSHOT.BAS under BASIC you will be prompted for the required key selections. Thereafter the program will create SNAPSHOT.COM, which is a regular DOS command. WordStar users -------------- If your regular word processor is WordStar, before running SNAPSHOT.BAS you should edit it as follows: 1. In line 30, change the checksum shown from 51461 to 51462. 2. In line 430, change the third number (just to the left of the -2) from 0 to 1. The purpose of these changes is to provide a "stripper" function so that WordStar files will be readable from other applications. Notes ----- 1. SNAPSHOT.BAS must be run with GWBASIC or IBM BASICA or a compatible version of BASIC to create SNAPSHOT.COM @@SWEEP SWEEP Charles Petzold Repeat command in each subdirectory ------------------------------------------------------- Purpose ------- Causes a command to be successively executed in every subdirectory on a hard disk. Format ------ SWEEP command Remarks ------- SWEEP starts from the current directory. In order to use SWEEP to extend the range of a command to all the subdirectories on a disk, use CD (if necessary) to make the root directory your current directory. From the root directory, the command SWEEP DIR will display the listings, by subdirectory, of every non-hidden file on the disk. To erase all the .BAK files on a disk you need only get into the root directory and issue the command SWEEP DEL *.BAK SWEEP itself will not accept parameters other than its command. Thus, if you are on drive C: and wish a directory of all files on drive D: to be sent to your printer, you must first make drive D: the current drive before you issue the command SWEEP DIR > LPT1 (In this case you would either need a copy of SWEEP.COM on drive D: or else drive D: would have to be listed on your PATH.) SWEEP can execute .BAT file commands (and even non-DOS commands, such as LOCATE.COM). A useful file called CLEAN.BAT might consist of the three lines DEL *.BAK DEL *.TMP DEL *.OBJ From the root directory, if you then enter SWEEP CLEAN all .BAK, .TMP, and .OBJ files will be erased from the disk. Notes ----- 1. Requires DOS 2.0 or later. @@TED TED Tom Kihlken Text editor Version 1.1 ------------------------------------------------------- Purpose ------- A small, full-screen editor for line-oriented files of up to 64K in length that supports scrolling, cut, copy, paste, and printing operations, and permits entry of all characters in the IBM character set. Format ------ TED [filespec] Remarks ------- TED will open and read a file whose name (and path, if required) are supplied initially. If no filespec is provided it will open a new file and prompt for a filename when the Save and Exit command (F7) is given. The original of a modified file is saved with a .BAK extension. The Abort command (F1), when verified, abandons any modifications and leaves the original file intact. Lines may be of any length, and each must be terminated by pressing Enter. Lines longer than the screen width display a diamond in the rightmost column. Off-screen characters (up to 248 columns) may be viewed by using the Ctrl- keys. Lines may be broken by pressing Enter at any point, and may be conflated by pressing Delete at the line end. A block of text is defined by toggling on the Mark command (F4) and moving the cursor with the arrow keys. The Marked area is shown in inverse video. Pressing F3 prints the blocked text; F5 (Cut) removes it to a buffer from which it can be Pasted (F6) at any point where the cursor is located. The paste buffer remains intact until another section is marked and cut. Pressing F8 deletes to the end of a line; F9 deletes the entire line. F10 restores the most recent deletion of F8 or F9. The Undo command (F2) restores letters deleted by the Delete (but not by the Backspace) key if the cursor has not been moved. The Home and End keys move the cursor to the beginning and end of the current screen line; the Tab key moves to the next column evenly divisible by eight. Text is entered in Insert mode by default; pressing the Insert key toggles to overstrike mode. TED configures itself to the display in use and supports EGA and VGA text modes other than the standard 80 columns by 25 rows. PgUp and PgDn scroll the file by the number of rows displayed, minus 5. Ctrl-PgUp and Ctrl-PgDn move to the top and bottom of the file. Any character in the IBM set can be entered by pressing the Alt key, typing its ASCII value on the numeric keypad, then releasing the Alt key. @@TYPEFAST & TPFST-AT TYPEFAST & TPFST-AT Michael J. Mefford Keyboard speed-up ------------------------------------------------------- Purpose ------- To change the default keyboard typematic rate and initial delay. TYPEFAST.COM is a memory-resident (TSR) utility that works with all XT and later PCs and clones; TPFST-AT.COM is non-resident, but works only with late-model ATs (BIOS date 11/15/85 or later) and with XT 286, PS/2, and 386-based AT compatibles. Format ------ TYPEFAST [m][,n] | [/U] | [N] or TPFST-AT [m][,n] | [N] Remarks ------- Entered without any optional parameters, both TYPEFAST and TPFST-AT default to a repetition rate of approximately 17 characters per second (11 cps is the normal keyboard typematic rate) with a standard initial delay of 1/2 second. The optional m parameter sets the repeat rate and n sets the delay. For TYPEFAST, the m values may range from 0 through 31 (the default is 2) and n values may range from 0 through 3 (default 3). For TPFST-AT m values also range from 0 through 31, but in this case the default value of 27 corresponds to the 17 cps repeat rate. TPFST-AT n values range from 0 through 3 (default 1). The same numeric values for the optional m and n parameters do not produce the same results in the two programs, though in both cases the larger the number the greater will be the repetition rate and the initial delay. When executed, both programs show the appropriate syntax parameters on the screen. A single parameter may be entered (preceded by a delimiting comma if the first parameter is omitted) if the default value is satisfactory for the missing value. When installed, normally by being made part of an AUTOEXEC.BAT file, TYPEFAST occupies approximately 300 bytes of RAM. The program can subsequently be run again with new parameters without further memory penalty. Subject to the usual TSR limitations, TYPEFAST can be uninstalled by running it with the /U switch. The N option restores the normal typematic rates. Since TPFST-AT is not memory resident it cannot be uninstalled. To revert to the normal typematic speeds simply use the N switch. TPFST-AT provides slightly smoother response and permits the keyboard to use slower or faster than normal rates. TYPEFAST, on the other hand, provides better insurance against overshooting the desired stopping point. @@WAITASEC WAITASEC Charles Petzold Permits backward scrolling of DOS screen ------------------------------------------------------- Purpose ------- Uses the single-keystroke ScrollLock key to halt a fast-scrolling display; then allows you to scroll backwards, recalling previous screens. Format ------ WAITASEC (loads memory-resident program) then (activates WAITASEC) Remarks ------- WAITASEC is a memory-resident program that is normally loaded through your AUTOEXEC.BAT file. Thereafter, alternately pressing and releasing the ScrollLock key will halt and restart a scrolling display, e.g. a lengthy DIR listing. While holding down the ScrollLock key to freeze the display, if you also press one of the cursor movement keys (Home, Up Arrow, PgUp, End, Down Arrow, or PgDn), the display will not resume scrolling when you release the ScrollLock key. Thereafter, the Up and Down arrow keys move the display by one line, the PgUp and PgDown move it by 25 lines, and the Home and End keys take you to the beginning and end of the stored screen memory. Pressing any non cursor key at this point deactivates the stored mode, and the original scrolling resumes. Notes ----- 1. WAITASEC will not work with an 80-column color display if an unmodified PC-DOS ANSI.SYS has been loaded. (The ANSI.SYS that comes with various versions of MS-DOS does not cause problems with WAITASEC.) To run with IBM's ANSI.SYS, make a copy (MODANSI.SYS) of the original ANSI.SYS and use DEBUG to patch the copy as follows: DEBUG MODANSI.SYS E 29D 90 90 E 2A1 90 90 W Q Put the modified MODANSI.SYS in your CONFIG.SYS file in place of ANSI.SYS. 2. Because of the way they handle TTY output, certain EGA cards will not permit WAITASEC to scroll backwards. This problem can often be cured by adding MODANSI.SYS, as above. 3. WAITASEC does not save your current display screen. 4. While WAITASEC has been found compatible with XyWrite III (XYKBD.COM loaded) on a PC/AT, as with other memory-resident programs, unforeseen hardware and software incompatibilities may be encountered. @@WIPE WIPE Based on a program by Steven Holzner Secure file delete utility Version 1.0 ------------------------------------------------------- Purpose ------- Provides security by deleting files permanently so that their contents cannot be recovered. Format ------ WIPE filespec [filespec]... [/N] Remarks ------- The DOS DEL command does not physically erase data when it deletes a file... it simply removes the file's details from the directory and marks the disk space where the file's data is stored as free for future use. This is an advantage in that, in the case of accidents, it is often possible to recover a deleted file. It's a weakness, however, in that the DEL command alone is not enough to stop a determined person from recovering sensitive information that you thought you'd deleted. WIPE provides extra security when you need it... it first overwrites the data in the file and only then deletes it. In fact, it overwrites the existing data three times with different values and obscures the file's original directory details to the point where most automated undelete programs will not even attempt to recover the file's data. WIPE asks for confirmation before wiping each file specified (you can use wildcards or give several filenames separated by spaces). Press Y to go ahead or N to leave the files as is. If you want to wipe a group of files and are sure you know what you are doing, add /N to the WIPE command. The program will then ask for confirmation only once before wiping each selected file in turn. Notes ----- 1. Requires DOS 2.0 or later 2. WIPE replaces the original DELZ program by Steven Holzner @@XDEL XDEL Ronald Czapala Selective file delete ------------------------------------------------------- Purpose ------- Presents each selected filename in turn for single- keystroke file deletion or retention. Format ------ XDEL [d:][file.ext] Remarks ------- If no parameters are specified with XDEL, the default filename *.* is used. Both the global characters ? and * may be used in selecting the files to be presented. The program produces an on-screen menu of keystroke choices, as follows: - deletes current file displayed - skips current file displayed - restarts file display - returns to DOS Notes ----- 1. Although XDEL.COM requires DOS 2.0 or later, you must use CHDIR (CD) if necessary to make a subdirectory your current directory.