UTILITIES MICHAEL MEFFORD Vol. 9, No. 12 PRUNE 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 (August, 1987) and DIRMATCH (September 26, 1989) 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.COM 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 backup 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 ----------- ------------ 0 Black 8 Dark gray 1 Blue 9 Light blue 2 Green A Light green 3 Cyan B Light cyan 4 Red C Orange 5 Magenta D Violet 6 Brown E Yellow 7 Light gray F White 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 Replace the 1 with a 0 to reenable 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. Thus, for example, if you have DirMagic, a popular subscription premium from PC Magazine's sister publication, PC Computing, you would 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