M2Du v5.22 - 05/30/90 - A Directory Utility by Greg Browne ŻŻŻŻŻŻŻŻŻŻ A Shareware Dual Window Directory Utility written in Modula-2. This program will automatically handle up to 1000 entries per directory. This replaces my single window version (ended at 4.06). For those who like the one window version, sorry. CONTACT: frequent - New Horizons BBS (505) 437-9117 (7pm-8am 300-2400) medium - Kustom Kastle BBS (505) 437-0701 (always) occasional - CIS [72250,106] snail mail - 1821 Ocotillo, Alamogordo NM, 88310 DISCLAIMER: Use at your own risk! I will NOT be responsible for any damage you may do to your system/disks/files through use of this program. THERE ARE POTENTIALLY DANGEROUS AND DESTRUCTIVE FUNCTIONS IN THIS PROGRAM, ALL DESCRIBED IN THIS DOCUMENTATION, SO PLEASE READ IT (OR AT LEAST THE ReadMe.FIRST file) BEFORE PLUNGING AHEAD. FOR HEAVEN'S SAKE, DON'T USE ZAPALL UNTIL YOU READ HOW IT WORKS. BE ALERT: There are MANY UNMARKED gadgets and invisible functions in this program, all described under UNMARKED GADGETS and referred to throughout this documentation (so it pays to read this). SHAREWARE NOTICE: This program is shareware. It is not GUILTWARE!. I hate guiltware notices, so use this without guilty feelings as long as you want to. Shareware, or my idea of it, should be friendly and VOLUNTARY, so If you like this and want to promote the further development and improvement of the program, please read the 'ReadMe.REGISTER' file and send a contribution of YOUR choosing to the "snail mail" address at the beginning of this file. There are several levels of support, and each carries something different. The opening requester (if there was one) can be recalled by clicking the RIGHT mousebutton on the bottom line of the window. This program has taken far more than a thousand hours of my time now and has been well used and tested in the "real world", and I finally feel it is good enough (and solid enough) to ask for a return on my time. THANKS: Special thanks: My wife, Lyn, who never complains, even when I disappear into the computer room and "hog her Amiga" all night. She can't understand why my '286 clone sits unused so much..... but then, she never wants to use it, either. Rick Sinars, owner of New Horizons (best Amiga store in the southwest) No, he didn't pay me to say that - for introducing me to the Amiga and supporting my efforts in programming. Jeff Francis, for his encouragement and input. Chris Adams, SYSOP of Kustom Kastle BBS here in Alamogordo - for making me realize that dual windows were the "only way to go" even if he still uses SID. Generally, to too many other people to list, for their ideas, testing and help. Also, even if I ignore some or all of your ideas and suggestions, thanks for the input. You never know when I might implement some of them. +++++++++++++++++ GENERAL OPERATION +++++++++++++++++ WB STARTUP: Double click the icon. There are no included tooltypes. All customizing is done through the Du.hist file (described below and in the sample). When run from the WorkBench, an output window will be opened as needed for any external programs. This window will hang around until it is specifically released or the program ends. You release it by clicking the mouse in it to activate it, and then pressing any key while it is active. It will NOT close until you return to the Directory Utility, but then it will go away until it is needed again. CLI STARTUP: Type 'Du5' or 'Run Du5' (or whatever YOU name it). It does NOT detach from the CLI automatically (use Runback for that). It also accepts one argument. If a tail argument is included, it should be the name of a file to read in place of Du.hist as history/command file. If included, and the named file does NOT exist, NOTHING will be read. When run from the CLI, the current CLI window will be used for all external program output. CONFIGURATION FILE (Du.hist): Read the Du.tutor file for how to set up some startup commands which allow customization. The file will be looked for FIRST in the current directory, and then in the s: directory. DUAL WINDOWS: This version has a display window for both the Source directory and the Destination directory. The Source must ALWAYS contain a valid directory. The Destination may at times contain a name or invalid directory, or a list of VOLUMES, and if so, it will show as empty, with the (D) INFOrmation line showing ??. Remember also that COPYall/COPYif, LZHall/unLZH, ZAPall and the Tagging gadgets ONLY work on the items in the Source window, or from Source TO Destination, so a quick SWAP (the upper <> gadget) of the Source and Destination windows is in order if you want to work these on the files on the right. The details will be explained at the various places where it is important. Please BE AWARE that this program always keeps the (S)ource directory as the equivalent of the CLI "Current directory". That means that all NON- pathed actions will attempt to relate to that directory. While you CAN do things like EDIT files in the Destination window, any external actions your editor takes (like saving a file with a new name) will probably relate to the Source window, since the program sees it as the Current directory. It is usually safer (and produces more predictable results) to do your EDIT and "DO" functions with the affected files in the Source window. Once you learn what to expect from the earlier described situation, you won't be as surprised to see a file being saved into the Source directory. This CAN be used to advantage with the "R" gadget items. i.e.... Using an "R" gadget with 'LHARC a SomeLZHFILE' + highlighted files in the DESTINATION window will cause them to be LHARCed into a file named SomeLZHFILE in the SOURCE window. You have to experiment with this to see what is a positive feature and what is an annoyance. COMMAND ACTIVATION: With the exception of the FILEWINDOWS and SLIDERS, which are active with the downpress of the LEFT mouse for sliding file highlighting or continuous scroll of the names in the windows, you must press & RELEASE the mouse button (either LEFT or RIGHT) over a gadget (or name) before it will register as a click. This way you can reconsider before releasing the button. However, if you move off a gadget before you release the button, you may get a surprise unless you move COMPLETELY off ALL the gadgets (the INFO area and message area are safe places). When commands are in progress, a "HANG ON" busy pointer will replace your regular pointer and clicks made at that time are only seen as possible command interrupts. KEYBOARD: Some of the commands have keyboard equivalents. These are: A = ALLtag (Source) ^P = PRINT X = SWAP S & D <> C = COPY R = REtag (Source) + = R+ E = EDIT S = ShoIFF 0-8=device gadgets F = FLPtag (Source) T = TYPE left to right. H = HTYPE U = UNtag (Source) ^C = QUIT Also, the occasional pop-up requesters may be answered by pressing the key corresponding to the first letter of the gadget of your choice. CONFIRMING: Messy & destructive commands ask for confirmation. When you are asked to "HIT [name] again to REALLY DO IT!!", USE THE LEFT MOUSEBUTTON only. The right mousebutton will NOT confirm these type actions, even those which were STARTED with the right mousebutton. ALSO remember these only work on files shown in the Source window or from Source to Destination. If you click the LEFT mousebutton on some other GADGET, the command will be aborted. INTERRUPTING: Multi-actions may be interrupted by clicking gadgets (including filewindows) with the LEFT mousebutton. Actions will stop AFTER the current pass is complete. When an action is in progress, ("HANG ON" busy pointer showing) mouse clicks are ONLY seen as potential interrupts. Directory reads only interrupt if you click in the filewindows. Directories with too many files (over 1000), will be read for the first 1000 files and then you will be warned that not all files may be present in the window. EXECUTE/RUN: DO f+R, DO R+f and EDIT, ShoIFF, TYPE, HTYPE, PRINT, & HPRINT are executed sequentially one-at-a-time and each waits for the previous one to complete (to reduce disk grinding when too many things try to access them) until the last (or only) selection is encountered. Then the RunCommand will be used (default is "run"[*]) to free up the DirUtil for other things. The sequence will be top-to-bottom in the Source window, followed by top-to-bottom in the Destination window. [*] The Du.hist command #R allows you to change this default. You may prefer "run >nil: df0: df1: dh0: dh1: dh2: vd0: ram: These are quick 'GET' gadgets. Using the LEFT mouse will put the clicked item into the Source box and try to 'GET' the directory for display. Using the RIGHT mouse will put the clicked item into the Destination gadget for possible use as a destination path, and reading the resulting device into the Destination window if it is valid and present. NOTE that you can display a complete Device List in the Destination window with the VOL button. (See 'VOL' for explanation). [ Commands #0 through #6 in Du.hist can change these to ANY device name which will fit in 4 or less characters TOTAL when including the ':' ] FILEWINDOW GADGETS: Click an unselected file OR directory to "select" it. Click on "selected" items to "unselect" them. (See the ShowIFF.ME file for a picture) Most actions need "selected" things to work on. If you move the mouse up and down in the window while the LEFT mouse is pressed, files passing under the pointer will be acted upon in the same manner as the FIRST name that was under the pointer when the mousebutton was pressed. If that item was selected by the press, all items passed over will be selected, and vice versa. Filenames display in several different sorted orders as described under TOGGLE GADGETS (sorts are NOT case sensitive and may be Normal or Inverted). If you click the RIGHT mouse over a directory name, it will be selected as the new directory to 'GET'. Note that clicking RIGHT mouse in the Destination window will 'GET' the new directory into the Destination filewindow. NOTE: Any or all filenames AND/OR DIRS may be selected at once. Also see "UNMARKED GADGETS" below for a 'HOLD' feature in display. SLIDER GADGETS: These scroll the filenames in the windows. If the slider is filled, all files and directories are already visible. The slider is divided into two narrow segments, each of which controls the window closest to it. You may click above or below the slider to pull it toward the click area, or you may click on the slider and drag it up or down. If you drag it, the files in the appropriate window will scroll up and down as you move. NOTE: Using the RIGHT mouse on sliders invokes a UNMARKED gadget described in "UNMARKED GADGETS" below. /\ and \/: These are mini-motion file window scrollers. Using the LEFT mouse moves the files displayed one file in the arrow direction, and using the RIGHT mouse move the files displayed one SCREEN (12 files) in the arrow direction. These are also divided for control of the left and right (Source and Destination) windows. MULTIPLE R GADGETS (HISTORY): The Run gadget holds a circular list of 20 strings. These strings are useful primarily for holding commands for execution with or without being combined with highlighted file or directory names as described in the DO f+R and DO R+f gadgets explanation. You can put your favorite 20 commands here for easy access. The current Run gadget is filled from the history item indicated in the title bar as R-nn. Using the small box to the right of the Run string box marked "+-" flips through them, the LEFT mouse moving one direction (+) and the RIGHT mouse moving the other direction (-). The item number on display is shown in the R-nn in the title bar. Setting up a group of these strings is described in the Du.tutor file. You may also manually enter one by simply clicking the LEFT mouse in the box and typing the desired input. To record it for future use, you must end your typed input with a , otherwise the history strings will not save the typed input, and the next time you flip around, the OLD contents will still be there. This must also be done while the program is waiting for normal gadget activity to be permanent. Remember, while commands are going on, the program only looks at gadget selection as interrupts. Changes made during activity, OR ended without ing will be TEMPORARY. Then, scrolling the history +- will return the last saved history for that item. Experiment with it. STRING I/O GADGETS: -> Marked as 'R' 'S' 'D' beside them. All these are 255 characters long, though only part of the string is seen. To view a long string, activate the gadget, and use arrows to scroll it. (R)un [to the immediate RIGHT of the small box holding the letter 'R'] holds a part of a command line for the 'DO' gadgets OR the name to use for a RENAME command. The content is described above and the use is described in the DO f+R and DO R+f gadget explanation. They may be used alone OR as part of a command combined with highlighted files. SEE ALSO HISTORY ABOVE AND THE 'R+ R-' button and the 'DO f+R' and 'DO R+f' sections. (S)ource [to the immediate LEFT of the small box holding the letter 'S'] holds the name of the current active device or directory, which is displayed in the left window (above the gadget box). A LEFT mouseclick on a DEVICE gadget (described above) replaces whatever was here. If you click the LEFT mouse in the box to activate the gadget, then type in a pathname and hit , the program will try to use your entry as a new current device or directory. If successful, the files and directories in that path will be displayed in the filewindow. If access to it fails, the program returns to the last good active directory name (or to ram: if that, too fails). If you click the RIGHT mousebutton IN THE BOX, a 'PARENT' command is done and the program tries to back up one level in the directory tree. (D)estination [to the immediate RIGHT of the small box holding the letter 'D'] holds the name of the path shown in the right window (or a filename in some cases) to use for certain GADGET functions. Clicking the RIGHT mousebutton IN the box backs the name up to its PARENT level and displays the resulting directory (if any). You may also click the LEFT mousebutton in the box to activate the gadget and manually type in anything you want (preferably something related to what you are doing). A RIGHT mouseclick on any DEVICE gadget will put that device name into the Destination gadget and attempt to read the directory into the window. NOTE: The Message area at the bottom is NOT a gadget. But clicking the RIGHT mouse there will show the version number and its creation date. ++++++++++++++++ UNMARKED GADGETS ++++++++++++++++ These are gadgets which are not part of the orderly array of boxed name gadgets across the bottom of the window which are described below, but are just as important (or more so in some cases) as those formal gadgets. Be sure to read this section carefully. They take some thought to remember since they are not all clearly visible, but usually they are placed for easy access in the situations where they are used. IF YOU HAPPEN TO CLICK THE LEFT MOUSE DOWN SOMEWHERE AND THE AREA HIGHLIGHTS, IT IS A HIDDEN GADGET WHICH YOU CAN FIND BELOW. Clicking the RIGHT mouse on the "SIZES/DATES/etc" gadget at the top of the window will toggle on and off an interlaced screen which has much larger filewindows. This mode can be the startup mode if the command #L (for "L"ace) is included in the Du.hist file. While in the interlace mode, the SHRINK function is disabled, and anything which works on the WorkBench screen will still be there. The Screen Front/Back gadgets are available at the extreme upper right of the screen without moving the window. Clicking the LEFT mouse on the LETTER 'R' will erase the contents of the Run box beside the letter. Clicking the LEFT mouse on the LETTER 'S' or 'D' will cause a directory re-read of the current directory displayed in the Source or Destination box if it is valid. Clicking the RIGHT mouse on the LETTER 'D' will cause the Destination box gadget to be erased and the right filewindow to be cleared. Clicking the RIGHT mouse on the LETTER 'S' toggles a special mode(*) and changes the 'S' color to indicate which mode is active. The letter between the Chip and Fast memory display in the title bar also changes. White (original color) with 'R' in the title bar means reads of the directory will always display with the first file at the top of the window. Green (or orange, same color as device names) with 'H' in the title bar means reads of the directory try to display from the same relative position as last directory which was read. (*) [I call this a 'Hold' mode. It is useful for comparing two similar areas of a directory after a re-read, where the area you want to examine is below the first screenful of files. When the mode is on, the window will attempt to redisplay a re-read at the same position and keep the slider where it was. Clicking the RIGHT mouse on the LETTER 'R' causes the string in the Run gadget to be scanned as follows: If it starts with # or ; it will be evaluated as a setup command and acted upon as such, possibly replacing one of the customizable items. Otherwise it will be considered a history filename, which if opened successfully, will be read as a NEW history and command file. Clicking the RIGHT mouse on the PRT:/PAR:/SER: toggle gadget will dump a Source directory file listing to whatever device or file is showing there, including sizes, dates, times and flags. This is most useful for hardcopy or script file building. I use "t:xx" in place of SER: to get directory dumps to a file named xx in the t: directory. Clicking the RIGHT mouse on the NAME/READ/SIZE/DATE gadget toggles sort inversion. See the gadget description below for more information. Mode will be displayed in the extreme left of the title bar as 'N' or 'I'. The sort order applies to BOTH windows simultaneously. Clicking the RIGHT mouse on either SLIDER appends the next highlighted item in the Source window onto the both the Source gadget string AND the Destination gadget string separated with a "/" and then tries to get the new Source and Destination as if they were directories. IF THEY ARE NOT DIRECTORIES, it drops it back off the Source string but leaves it on the Destination string and clears the right window as no longer valid. Useful for duplicating paths. Clicking the RIGHT mouse on 'EDIT' causes the FIRST character in the Run gadget string to be evaluated and its ASCII decimal value to be displayed in the Message area. Just for odd characters I can't remember the ASCII value of. Clicking the RIGHT mouse on S->D (the top > in the center) will cause the first HIGHLIGHTED directory in the Source window to be read into the Destination window. Likewise, clicking the RIGHT mouse on the D->S (the top < in the center) will do the reverse for any directory highlighted in the Destination window, pushing it into the Source window. This is a successive EXPLORE, wander-around function. ALSO the explore function in the above paragraph works through 2 new (5.12) gadgets which are the outside side borders of each filewindow, running from top to bottom. Highlighting a directory name in a window and then clicking EITHER the LEFT or RIGHT mouse on the extreme edge of the window will cause that directory (full pathname extended) to be read into the opposite filewindow. Clicking the RIGHT mouse on the S<->D (top <> in the center) gadget will cause an immediate re-read of the directories in BOTH windows. Clicking the RIGHT mouse on a NON-directory area in either filewindow will cause the message line to display the TOTAL number of blocks used by files marked in the Source window. Two unmarked gadgets are formed by the space between the extreme left vertical border and the (S)ource box and also between the the extreme right vertical border and the (D)estination box. These are "REMEMBER ME" gadgets which work this way: Hit the LEFT mouse on the gadget and the current visible string in the related box will be "REMEMBERED" for later use. Hit the RIGHT mouse on the gadget and the last "REMEMBERED" string will be swapped with the current visible string. The RIGHT mouse is a SWAPPING toggle, and if you keep using it, it will switch back and forth. Every time you use the LEFT mouse, the old (if any) "REMEMBERED" string will be discarded and the current string will be "REMEMBERED" for the future. This way, you can have 2 easily accessible directory names for each window, and move back and forth quickly. Finally, the old LZHall gadget (no room now) is an unmarked space bounded by the CPYall gadget left edge and the Left window edge, the height of the CPYall gadget. AND The old unLZH gadget (no room) is now an unmarked space bounded by the DELETE gadget left edge and the Left window edge, the height of the DELETE gadget. No one but me seemed to want to use these, so I forfeited them to hidden status in my quest for 3-d and less clutter. These work the same as always and are still described below in the button gadget section. +++++++++++++++ BUTTON GADGETS: +++++++++++++++ THE BUTTON GADGETS ARE GENERALLY THE MAIN COMMAND ACTIONS. THEY ARE LAID OUT IN A FUNCTIONAL PATTERN SUITED TO MY TASTE (LIMITED BY AVAILABLE SPACE). I HOPE YOU CAN LEARN TO LIKE IT, BECAUSE THEY DO NOT MOVE. The descriptions are presented below roughly in alphabetical order. ---- COPY (Multifile - sequential) ---- Copy any and/or all 'selected' file(s) from the EITHER window to the PATH specified in the OTHER window, which must be a valid device or directory. Multiple copying is supported, but copying TO specific filenames is not supported. This checks and honors the PRTECT gadget setting. Using the LEFT mouse will cause the action to STOP if file status does not match PRTECT gadget or if an error occurs. Starting with the RIGHT mouse will cause copying to SKIP the nonmatching file and go on. You can interrupt this by clicking any gadget (the filewindows are easy to hit). The pattern is top- to-bottom in Source followed by top-to-bottom in Destination. You can do cross copying to and from BOTH windows in the same pass. Both directories are re-read at the end of the entire sequence. ------ CPYall (CONFIRMED BY RE-CLICK) (Mass file/directory copy) ------ Copy entire directory or disk contents, creating the necessary tree structure on the fly. To do this, put the base level source directory name in Source and the base destination PATH in Destination (which will be recreated if it does not exist) and select COPYALL (and then confirm it). This copies EVERYTHING in the directory named in Source AND ITS SUBDIRECTORIES to the Destination path, creating directories as it goes. IF the destination fills, a pop-up requester will give you a chance to change disks and continue. Starting with the LEFT mouse will prevent creating empty directories, but starting with the RIGHT mouse will recreate the exact directory structure (even empties). The Destination directory is NOT updated as you go, but is re-read at completion. This is specifically confirmed and DOES NOT check the PRTECT gadget setting. Ex: Copy entire disk (like COPY df0: to df1: all) Enter 'df0:' into Source and 'df1:' into Destination and go. Copy the 'devs' directory Put 'dh0:devs' into Source and 'df1:devs' (existing OR NOT) into Destination, and start. This creates (if needed) the df1:devs directory, copies all files, creates df1:devs/printers (if needed) and copies all dh0:devs/printers files to it. **** SPECIAL NOTE: IF COPYALL is confirmed by clicking the HIDDEN LZHall gadget, copying will still be done to the destination directories BUT the files in the Source directory will be compressed into files in the destination directory named 'DuFiles.lzh' using lharc a DuFiles.lzh which can be restored later by using the hidden unLZH gadget. I use this for backup. HOWEVER - the destination MUST have enough room to hold the entire tree in LHARCed form. THIS REQUIRES Lharc to be in the current search path. ------ DELDIR (CONFIRMED BY RE-CLICK) ------ DIRECTORY delete. For this to work, the directory must be 'selected' and EMPTY. ANY and/or ALL highlighted directories in the BOTH WINDOWS will be deleted, if empty SO BE CAREFUL ABOUT WHAT IS HIGHLIGHTED. Starting with the LEFT mouse will cause this to stop if a directory doesn't delete properly. Starting with the RIGHT mouse signals the program to continue EVEN if a directory doesn't delete by skipping it and trying the next one. The pattern is top-to-bottom in Source followed by top-to-bottom in Destination. You can do directory deletes in BOTH windows in the same pass. Both directories are re-read at the end of the entire sequence. ------ DELETE (CONFIRMED BY RE-CLICK) (Multifile - consecutive) ------ FILE delete. Any and/or all file(s) currently 'selected' IN THE BOTH WINDOWS will be deleted. The message area shows your progress. Starting with the LEFT mouse will cause the action to STOP if a file does not delete properly or if another error occurs (including finding a delete protected file). Starting with the RIGHT mouse will cause delete to SKIP the offending file and go on. You can interrupt this by clicking any gadget (filewindows are easy to hit). The pattern is top-to-bottom in Source followed by top-to- bottom in Destination. You can do deletion from BOTH windows in the same pass. Both directories are re-read at the end of the entire sequence. ------ DKCOPY (CONFIRMED IN SEPARATE REQUESTER) ------ Diskcopy the floppy referenced in Source to the floppy referenced in Destination. BOTH the Source and Destination must be in the range df0:-df3: (or ff0:-ff3: if you are using FFS on floppies). You can not copy a df? to an ff?. This routine increments the ticks on the destination floppy date so AmigaDOS won't be confused by identical disks. This IS interruptible like most other operations. Starting with the LEFT mouse signals NOVERIFY and with the RIGHT mouse signals VERIFY. ------ DKWIPE (CONFIRMED IN SEPARATE REQUESTER) ------ This is a QUICK WIPE OF the disk referenced by Destination. It MUST BE df0:-df3: or ff0:-ff3:. This action actually rewrites track 40 completely with a fresh root block and empty bitmap. Again, starting with the LEFT mouse signals NOVERIFY and with the RIGHT mouse signals VERIFY. ------ ------ DO f+R DO R+f (Multifile - consecutive) ------ ------ These are 'RUN a program' commands. The f+R or R+f choice indicates which order to string together things before execution IF YOU DO NOT use the special {} modifiers described below. Choosing f+R causes the program to take the next 'selected' item and the Run gadget string in that order and put them together and call the DOS function Execute(). Choosing R+f reverses that order but still calls the same function. AmigaDOS Execute() operates like typing the command from the 1> prompt (sort of). These gadgets NORMALLY take the highlighted items in succession and DO INCLUDE 'SELECTED' DIRECTORIES in their sequential patterns. That pattern is top-to-bottom in the Source window, followed by top-to-bottom in the Destination window. HOWEVER, if you start with the RIGHT mouse on 'DO R+f', it executes the contents of the Run gadget alone once WITHOUT touching or changing the 'selected' files and directories. This is NOT like a script handler 'EXECUTE'. To execute a SCRIPT, you would put the command EXECUTE in the Run gadget and 'select' the script before choosing the DO R+f gadget. If NO items are selected, BOTH will try at least once to execute the string in the (R)un gadget by itself. Whether command is RUN (asyncronusly) or executed (syncronusly) depends on other things (for details, see the EXECUTE/RUN section at the beginning). SPECIAL MODIFIERS FOR COMMANDS: These functions also have some enhanced ability to parse the string first, looking for special character sets as shown below. Wherever these are found they will be replaced with the contents of the related string (each may appear 0 or more times in the string). {S} = (S)ource string | {D} = (D)estination string | These ARE case sensitive. {f} = (f)ilename | {p} = (p)ath [depends on which | window {f} is in] | Each {f} found will cause the NEXT highlighted item (file OR dir) to be used in its place. If there are more {f}'s than highlighted files, they will be filled with nulls (extra {f}'s will be removed from the string). {p} will be replaced with EITHER {S} or {D} depending on which window the next highlighted filename (there should be one) comes from. This should be used instead of {S} or {D} whenever you want to combine the path with the filename, since the filename may come from either window. SOME examples: NewZap {f} | run newzap on next file NewZap {p}/{f} | ditto but use full path/name lharc a {D}/LhFile {f} {f} {f} {f} | add next 4 highlighted files | to a file in (D) named LhFile) ---- EDIT (Multifile - consecutive) ---- This will start your favorite editor with successive selected FILEname(s) as command line tail(s). If no files are selected, your editor will be RUN with no file. The default name (my favorite editor) is "dme", but the #E command in Du.hist can be used to set it to your favorite name. This obeys the EXECUTE/RUN rules listed at the beginning. [ Also remember that there is a 'hidden' function available (unrelated to real editing) by using the RIGHT mouse on this gadget. ] The pattern is top-to-bottom in the Source window, followed by top-to-bottom in the Destination window. ------ FORMAT (CONFIRMED IN SECOND REQUESTER) ------ This will FORMAT the floppy disk indicated in the Destination gadget. It MUST BE in the range df0:-df3: (or ff0:-ff3: if you are using FFS on floppies). This will create an FFS floppy EVEN IF you haven't MOUNTed your ff?: drive. It names the resulting disk "New:" for simplicity, and uses current system date, but it DOES NOT INSTALL a disk as bootable. This IS interruptible like most other operations. Starting with the LEFT mouse signals NOVERIFY and with the RIGHT mouse signals VERIFY. ------ GETDIR (DOES NOT HAVE ITS OWN GADGET) ------ GETDIR (as used by some other DirUtils) is done by clicking the RIGHT mouse button over a directory name in the filewindow. This may be done in either filewindow, and the directory clicked will be added to the string gadget for that window. The resulting path will be read into the clicked window. ---- INFO (NOT A REAL GADGET) ---- The program automatically monitors disk insertion/removal and changes made to Source and Destination. It redisplays the Volume name ABOVE each window, and the free/used bytes and number of files/directories/total for both with every change. Note that changing a disk physically does NOT cause the file list to update, ONLY the INFO lines. This may be used to check several floppies without all the reading, by placing the proper df?: name in the Destination box and then changing disks. As each is inserted, the Volume, Free/Used and Files/Dirs/Total information will be changed. You can not do this with the Source box, since the program internally keeps a lock on that disk or directory, and also changes the Currentdir to that location. Under each filewindow (if valid contents) is the following: Files Total Bytes Bytes | Dirs | Free Used | | | -------- --------- --- --- ---- ?/ ? ?/ ?/ ? ------ INSTAL (CONFIRMED BY Requester) ------ This will INSTALL the floppy disk indicated in the (D)estination gadget with a standard boot block (and empty block 2). You will be asked to choose whether it is to be a NON-BOOTING or BOOTING disk or if you want to QUIT without doing the install. If you choose NON-BOOTING, the disk will be unINSTALLED to look like a NON-BOOT floppy. The diskette in (D)estination MUST BE in the range df0:-df3: as this does NOT work on a FFS floppy (since they are NEVER bootable). This IS interruptible like most other operations. Starting with the LEFT mouse signals NOVERIFY and with the RIGHT mouse signals VERIFY. This reads track 0 and writes a fresh boot block and block 2 and will not damage other good data on the track. ----- MKDIR ----- Clicking the LEFT mouse button here will attempt to make the directory named in the Source gadget (if it is a valid directory name and NOT already existing). Clicking the RIGHT mouse button here will attempt to make the directory named in the Destination gadget (also if it is a valid directory name and NOT already existing). If a complete dev:path is NOT given, the RIGHT mouse function will create the directory relative to the path showing in the Source gadget. A check IS made to insure you are not trying to create a directory with an already existing name (OR over a file - which is possible and will kill the file). The ENTIRE path will be created if necessary, so you do NOT have to make one level at a time. If these are successful, the newly made directory will be entered and read (should be empty). CAUTION: To make a directory in the Source window, do NOT hit the key after typing in the desired name. Since this window must have a valid directory name in it (program requirement), you must fool the program until the directory is made. By not hitting you do not alert the program to the changes made. ---- MOVE (Multifile - consecutive) ---- This will MOVE items highlighted in the BOTH WINDOWS to the path (MUST BE AN EXISTING PATH) in the OPPOSITE window. It tries to RENAME the file or directory first and if that fails (and the 'item' being MOVEd is NOT a directory) it tries copy-and-delete-source. This DOES check and honor the state of the PRTECT gadget. MOVE will work across devices for FILES, but you can NOT use MOVE to move directories across devices. You must use COPYALL followed by ZAPALL to do that. Using the LEFT mouse will cause the action to STOP if file or directory status does not match PRTECT gadget or if an error occurs. Starting with the RIGHT mouse will cause moving to SKIP the offending item and go on. You can interrupt this by clicking any gadget (the filewindows are easy to hit). The pattern is top-to-bottom in Source followed by top-to-bottom in Destination. You can do cross moves to and from BOTH windows in the same pass. Both directories are re-read at the end of the entire sequence. *WARNING* - A bug? feature? in the ram-handler lets you rename a file in ram: to an existing name in ram: without a DOS error 203 and leaves you with 2 identically named files in the same directory. Just so you will be aware, I didn't try to trap that. (* vd0: also does the same thing! *) ------ PARENT (DOES NOT HAVE ITS OWN GADGET) ------ To get the PARENT level of either directory path, click the RIGHT mousebutton inside the Source or Destination gadget box (the string holder). The new directory will be read and displayed. If the path is valid, the Info area at the bottom will update. Otherwise, a series of ???? marks will appear in the invalid item. ------ RELABL (CONFIRMED BY RE-CLICK) ------ This will relabel the disk or device named in the Source gadget to the NAME given in the Run gadget (this is new - previously the NAME had to be in the Destination gadget - was changed for same reason as RENAME below), both in memory and on the disk or device. This is internal and does NOT require the program Relabel. The NAME in the Run gadget should not have any : or / in it, and they will be removed if found. ------ RENAME (ONE FILE OR DIRECTORY - NOT MULTIPLE) ------ Rename the FIRST selected file OR directory found in the Source window (using the current sort order) to the NAME entered in the RUN (this is new) gadget. My single window version required the new NAME in the Destination gadget, but since it may have a valid directory you don't want to lose, the new NAME must be in the RUN gadget. This will also work within the current directory. Wherever practical, MOVE is faster. Using the LEFT mouse will force a re- read of the directory (since the item may be still be there) but using the RIGHT mouse will inhibit a re-read; the old name will be dropped, and the new name NOT added even if still there. ---- ROOT ---- This will back up to the root of the device or directory shown in the Source or Destination gadget. If this fails with the Source gadget, the program tries to return to the last good current directory (or ram: as a last resort) Beyond that it issues a message to make you fix it. The LEFT mouse specifies that the action is for the Source gadget, and the RIGHT mouse specifies that the action is for the Destination gadget. If the ROOT level is no longer valid in the Destination gadget, the window will be blanked out, but it will be accepted as a valid action. ------ ----- ------- ----- ------ ------ ALLtag RETAG FLIPtag UNTAG OldNew ARCtag ------ ----- ------- ----- ------ ------ These are various mass tag ('select') operations on FILES IN THE EITHER WINDOW. (This is a major change. Previously LEFT mouse indicated FILES and RIGHT mouse indicated directories but in the SOURCE window only). For all items EXCEPT OldNew (which is explained below), the LEFT mouse indicates FILES in the SOURCE window and RIGHT mouse indicates FILES in the DESTINATION window. Note: in some DirUtils -> ALLtag is called ALL UNTAG is called CLEAR ALLtag Select ALL files REtag After multifile operations this reselects files which were selected before (if they remain now) FLIPtag Reverses all tags from what is currently set. UNTAG Clears all tags ARCtag Select files if their ARCHIVE bit is CLEARED (i.e. changed files) ******* SPECIAL CASE TAGGING ******* OldNew Select or bypass files IN THE SOURCE WINDOW based on their status in the Destination DIRECTORY as described below. This looks through the directory of the list in the (D)estination window, so to be accurate that list should be up to date. LEFT mouse = select files which DO exist at the Destination (Old) RIGHT mouse = select files which DO NOT exist at Destination (New) ------ ------ SetCOM ShoCOM (NOT multifile) ------ ------ These are for working with FileComments. They work on the FileComment relating to the first 'selected' file OR directory found in the SOURCE WINDOW. They perform their action and then 'unselect' the item. SetCOMM LEFT mouse = Attach content of Run gadget to first 'selected' item. RIGHT mouse = Remove all comment from the first 'selected' item. ShoCOMM LEFT mouse = Show the comment (or -no comment- if none) in message field RIGHT mouse = Ditto, AND put it into the Run gadget for possible editing ------ SetFLG ------ Set flag bits on 'selected' FILE(s) OR DIRECTORY(s) IN THE SOURCE WINDOW. LEFT mouse = Do the work on the FIRST item found 'selected' RIGHT mouse = Do the work on ALL items found 'selected' The Run gadget must hold the letter(s) of bits you want to affect. The order of letters (or +-) does NOT matter. IF a (+) is included, it ADDs these flags to current status if a (-) is included, it will remove those flags from current status if NEITHER is included, it will set the flags to the status shown Protection bits are (UPPER or lower case o.k.): H(idden) Set = a "Hidden" file (Ignored now, I think). P(ure) Set = "PURE" re-entrant file. S(cript) Set = script file for Shell. A(rchive) Set = file UNchanged since bit was set. R(ead protect) Set = DENY permission (Ignored now) W(rite protect) Set = DENY permission (Ignored now) E(xecute protect) Set = DENY permission (Ignored now) D(elete protect) Set = REFUSE deletion (Honored by DOS) Be careful. For example +d will SET the 'd' flag, meaning it is delete protected, and the 'd' will no longer show up in the list, BUT +p will set the pure bit and cause 'p' to begin to show up in the list. Note that the upper 4 bits (HPSA) are shown when SET and the lower 4 bits (RWED) are shown when NOT SET (permission to do those things is granted). i.e. ADDING R-W-E-D takes away permission by setting the bit. ------ ShoFLG ------ This shows the protection bit status on a 'selected' file OR directory in the SOURCE window. IF A LETTER SHOWS, it means the bit is SET for hidden, pure, script and archive files OR the bit is NOT set (permission IS granted) for read, write, execute and delete bits. This alters the current Run gadget, so be careful of messing up History items. The LEFT mouse requests a display of the NEXT 'selected' item and the RIGHT mouse requests a scan quickly through ALL 'selected' items. Both actions 'unselect' the items as they are passed. The SIZES/DATES/FLAGS toggle gadget below shows the flags more efficiently. ------ ShoIFF ------ This is a simple picture display. IF Du.hist has #S command, this external program will be available through the LEFT mouse and the internal show routine will be accessed by RIGHT mouse, otherwise, both will use internal routine, which is ok for most IFF and HAM, but not for some newer formats. To end viewing a picture with the internal routine, hit any key or press the mousebuttons somewhere below the (invisible) screen drag bar. Yes, you can drag the screen up and down with that (invisible) screen drag bar. The operating sequence is top-to-bottom in the Source window, followed by top-to-bottom in the Destination window. ---- ----- ----- ------ TYPE HTYPE PRINT HPRINT (Multifile - consecutive) ---- ----- ----- ------ This is for ASCII or HEX file viewing or printing. TYPE and HTYPE are done on the screen, and PRINT/HPRINT are sent to the item displayed in the PRT: gadget. (See TOGGLES/FLAGS section for an explanation of how that gadget works). Multiple item selections interrupt the same way as other functions. To scroll up or down in a file during screen output, hold the LEFT mouse down in the upper or lower ½ of window, or use the scroll bar. The closer to the center of the screen you move the mouse, the slower it scrolls. To move ONE LINE ONLY in either direction, click RIGHT mouse in the upper or lower ½ of the window. Click on the title bar to quit or interrupt an individual print or display. Tabs are currently expanded on 8 columns. NO color sequences or formfeeds are decoded. 'Line xx of xxx' is shown in the title bar. When PRINTing, this represents 256 byte blocks NOT lines. Interrupting a PRINT or view does NOT interrupt the program from trying the next 'selected' item. You have to be quick and click the filewindow or something between items to do that. The sequence is top-to-bottom in the Source window, followed by top-to-bottom in the Destination window. ******* NEW with 4.06 and beyond ******** These 4 buttons may now be tied to 2 external programs by use of #T and #P in the Du.hist file. TYPE and HTYPE may be changed to one external program by using the #T configuration, and PRINT and HPRINT may be changed to one external program with the #P command. See the Du.tutor file for the exact syntax. EVEN IF THIS IS DONE, starting ANY of the 4 with the RIGHT mouse- button will cause the internal routines to be used. NOTE: If PRINT or HPRINT is selected with RIGHT mouse, formfeeds will be sent after each file. This is true even if the external #P command is in use. - V (A little button like the 'S' 'D' and 'R' buttons) - This little gadget brings up a Device (Volume) List (not including PAR: PRT: SER: RAW: or CON:) in the Destination window (you lose whatever was there). You can scroll it up and down, and select an item for placement in a window by clicking on the line containing the item (much like selecting a directory) from the filewindow. Using the LEFT mouse will place the item into the Source window, and using the RIGHT mouse will place the item into the Destination window. ------ ZAPall (DANGEROUS - CONFIRMED IN SEPARATE REQUESTER - READ CLOSELY) ------ This is a mass directory-and-related-files delete. It works one of two ways, and ONLY ON FILES AND/OR DIRECTORIES SHOWN IN THE SOURCE WINDOW. Since it is SO destructive, it presents a requester for confirmation, and requires you to move across the screen and click it. You shouldn't do this by accident any more. 1) If a directory name IS 'selected' in the filewindow when ZAPALL is selected, it assumes you want to delete that directory AND ALL FILES AND SUBDIRECTORIES IN IT. 2) If NO directory name 'selected', it assumes you want to delete the CONTENT of the directory (or device) showing in the Source gadget, including ALL files and subdirectories, BUT NOT directory itself. (This leaves an empty, but existing, directory as shown in the filewindow) Examples: 1) To delete all files and subdirectories in df1:devs (but not df1:devs itself), put df1:devs into the Source gadget and hit ZAPALL twice (once to select, once to CONFIRM). This will leave an empty df1:devs as the currently displayed Source directory. 2) To delete df1:devs files and subdirectories AND IT, TOO, put 'df1:' into the Source gadget and select 'devs' on the filewindow with one click (it highlights). Then hit ZAPALL twice (once to select, once to CONFIRM), and all the files and directories in 'devs' will be deleted, then devs will be deleted, too (unless it is ASSIGNed to devs: - ASSIGN effectively delete protects the device or directory ASSIGNed). This gives message area progress reports. It deletes files backward, from last to first, recursing into directories as encountered. Watch and see. IT CAN be interrupted like other functions. ------ ----- LZHall unLZH (NOW HIDDEN GADGETS SINCE NOT IN GENERAL USE - SEE ABOVE) ------ ----- This is my personal backup and restore method and NOT "compression" gadgets (use the R- history items for your favorite of those - remember, FIRST AND FOREMOST, this program is a working utility for me on my job). I back up from HD to floppy frequently (especially on critical files) going to .lzh files either with a destination name of DuFiles.lzh or files with a name structure like my directories, putting all the files from one dir into one (or more) .lzh file. I had chosen ZOO for speed. I switched because LHARC is getting faster all the time, and I expect it will eventually be fast enough for me to not miss ZOO. If you can use this gadget fine, if not, ignore it. (It is too complex internally to change with a Du.hist command). LZHall ------ Action depends on whether LEFT mouse or RIGHT mouse is used. If, for example, (S)ource is dh0:Other/Du514 and (D)estination is df0: this is the result: using LEFT mouse using RIGHT mouse --------------- ------------------- dir name = dh0:Other/Du514 dh0:Other/Du514 lzh backup = df0:DuFiles.lzh df0:Other_Du514.lzh I just automated the naming and do-it process for myself. Below is a short description of the workings (LZHall and LZHif both work the same for now.) Execute 'lharc a' on the current Source directory putting the .lzh file in the path given in Destination, which may be a disk or directory. The tail used is "*" (all files) unLZH ----- This works when you have a file in the (S)ource directory named DuFiles.lzh. It takes that file and tries to use 'lharc e' to the (D)estination directory. I use it to UNbackup my files quickly. ----- R+ R- (A single character wide box to the RIGHT of the Run string box) ----- Scroll the Run history back and forth. READ 'HISTORY' EXPLANATION for what it is and how to use it. The LEFT mouse moves forward (higher numbers) and the RIGHT mouse moves backward (lower numbers). It is circular and will roll over when passing top or bottom. ------ D+f->D ------ This takes the first 'selected' item in the Source window and ADDS it to the Destination gadget string with a separating / if the gadget is not empty or ended with :. The resulting directory is read and displayed if valid. Use this to create directories at the destination end which have the same names as ones in the Source window. ------ R+f->R ------ This adds the next 'selected' file IN THE SOURCE WINDOW to the tail of the string in the Run gadget and unselects the file. It separates the item from the existing contents with one space. This does NOT affect the R-History, so R+ followed by R- restores the original 'R'. It is useful for building a single-line tail to use for a 'DO' command. ---- f->D (Hidden between the 'D' box and the Destination string box) ---- ---- f->R (Hidden between the 'R' box and the Run string box) ---- Move the FIRST 'selected' file (OR directory) in the SOURCE WINDOW into the Run or Destination gadget, depending on which one is chosen. This REPLACES the existing item. IF selected with the LEFT mouse the file moved will be UNSELECTED, but if selected with the RIGHT mouse, the file moved will still be SELECTED after the command is finished. This is handy for renaming a file (f->R followed by typed modifications and then hitting the RENAME gadget without having to re-SELECT the file). ----- R<->D (Hidden between the upper and lower <> on the swap/push cluster) ----- This is the two-way swap of the Run and Destination gadget content. There was no place to put another <> gadget (like those described below) near the actual "R" "S" and "D" items, so this went between the more used boxes. Since both the Run and Destination gadgets are altered, this will cause the current affected history item (number displayed in the title bar) to be updated, and the new content of the Destination gadget will be used to attempt a 'GETDIR'. ---- R->D (Hidden between the upper and lower > on the swap/push cluster) ---- ---- D->R (Hidden between the upper and lower < on the swap/push cluster) ---- These are two one-way gadget contents movers. They are similar to the R<->D gadget, but only affect one gadget or the other. If Run is changed, the current showing history item IS updated. If Destination is changed, it too is treated like a new entry and a 'GETDIR' is tried. ------------------ 'SWAP/PUSH CLUSTER' ------------------ > <> and < (Two rows directly below each other) ----------- These gadgets (between the "S" and "D" on the String gadget line and also to the left of the "R" beside the lower string gadget) are for other push and swap commands. UPPER ROW (Between the "S" and the "D") > - This pushes the Source box contents to the right into the Destination box and causes a fresh read of the directory to be placed into the Destination filewindow. [ Was S->D in the single window version. ] <> - This is the SWAP gadget. It swaps the Source and Destination and related filewindows. The Destination MUST HAVE BEEN a valid directory to work properly. If NOT, the original Source will end up in both windows. The RIGHT mouse on this button forces a re-read of BOTH windows. [ Was S<->D in the single window version. ] < - This pushes the Destination box contents to the left into the Source box, and the window contents into the Source window. This also MUST be a valid directory to work properly. [ Was D->S in single version. ] LOWER ROW (To the left of the "R") > - This pushes the Source box contents to the right into the Run box and is useful for quickly saving a copy of the current Source. [ Was S->R in the single window version. ] <> - This is another SWAP gadget. It swaps the Source and Run box contents. The Run box should contain a valid path before this, or a swap will simply fail, and the previous Source contents will be restored, causing BOTH boxes to contain the old Source contents. A RIGHT mouse on this button tries a special UNlharc restore described elsewhere. [ Was S<->R in the single window version. ] < - This pushes the Run box contents to the left into the Source box, causes an attempt at reading the new box contents as a Source directory. This also MUST be a valid directory to work properly. [ Was R->S in single version. ] +++++++++++++++++++++ TOGGLE (FLAG) GADGETS - LEFT mouseclicking these toggles through modes. +++++++++++++++++++++ =================== PRTECT/ERASE/REPLCE =================== This sets the protection mode to be applied to files found at the destination end of COPY and MOVE. It is NOT honored by COPYALL, COPYif, or ZAPALL, which must be specifically confirmed. The meanings of the displayed words are: 1. PRTECT - Don't continue if a file of the same name file EXISTS at the destination end. 2. ERASE - Don't care about a file of the same name at the destination. 3. REPLCE - Don't continue UNLESS a file of the same name EXISTS at the destination end. ======================= SIZES/DATES/TIMES/FLAGS ======================= This sets what to display about files. The filewindows change immediately when this is changed. 1. SIZES - File size in bytes will show. Directories show as (dir). 2. DATES - File AND DIRECTORY creation dates will show. 3. TIMES - File AND DIRECTORY creation time (hh:mm:ss) will show. 4. FLAGS - Shows protection flags in same manner as the ShoFLG button above does. ============= SysDTE/OldDTE ============= Select the date (and other things) to put on copied files. 1. OldDATE - The creation date of source file will be used, protection flags will be kept and any FileComment will be copied, too. (This is like AmigaDOS COPY with the CLONE option) 2. SysDATE - The current system date is used, no flags are retained, and existing FileComments are ignored. ============== PRT: PAR: SER: ============== This shows where the output from the internal PRINT and HPRINT routine will be sent. The default available destinations are: PRT: (the printer.device) PAR: (the parallel.device - usually the printer but in raw form) SER: (the serial.device) - this can be altered (*) PAR: is the default, since I bypass the PRT: device mostly. (*)SER: can be changed by the #O command (letter O not number 0) in Du.Hist. You may use your choice of any name which will fit into 4 characters. This means if you use a setup like '#Odump', SER: will be replaced by the name 'dump' and when displayed this will cause PRINT output to be sent to a file named 'dump' in the current directory. There is also a 'hidden' function available by using the RIGHT mouse on this gadget. When the RIGHT mouse is used here, a complete DIRECTORY listing including file sizes, dates times and flags is dumped to whatever device or name is currently visible in the gadget. =================== NAME/READ/SIZE/DATE =================== This selects, shows and activates the current order which will be used for filewindow sorting. There are currently 8 orders available (4 sorts with Normal and Inverted for each). When the gadget is changed, the display is also changed immediately. The current order applies to BOTH windows. The LEFT mouse toggles the sort order. NAME = Alphabetic by name READ = Raw order as read from the disk SIZE = Largest to smallest files - followed by dirs alphabetically DATE = Oldest to newest by creation date. The RIGHT mouse toggles the sort direction. The title bar at the extreme left will indicate 'N' for the normal (ascending) order for each type of sort, or 'I' for inverted order (decending). This toggles back and forth each time it is used.