Super File Manager Version 1.10 by Mike Crews October 10, 1990 Yes, this is another file / directory management utility. I personally like a "visual tree" type of disk utility so this is my contribution. This utility contains several unique features that I hope many will find useful. Features: - Visual directory tree structure - Remembers all directories once visited - Can show all files on a disk/volume at once - Copies in hashcode order for better disk performance - Will copy or move files and duplicate paths - Will move files across devices - Copies, moves, or deletes entire directories with subdirectories - Automatically creates destination directories - Preserves the date and protection bits of files (except the archive bit) - Auto-archive creation/viewing/extraction - Can utilize up to ten archive utilities based on filename extension - Can invoke custom byte and text editors on files - Can invoke custom IFF and text viewers on files - Sort files by name, date, or size in ascending or descending order - Examine and change protection bits - Uses a wildcard pattern for filtering file operations - Fully mouse or keyboard driven - Easy to use requesters - Menus Installation: The utility is easy to install. Simply copy "FileMan" and "FileMan.info" wherever you like. I personally run it from the CLI environment and therefore placed it in the C: directory. The con- figuration file 'FileMan.def' should be placed in the S: directory. The contents of the configuration file can be customized to control the number of bitplanes, colors, and the name of editors, file viewers, and archive utilities to be used. See Customization for more information. General Information: Execution From CLI: The File Manager can be run from either Workbench or CLI. When run from CLI the utility accepts an argument that can be used to specify the directory or device to catalog, otherwise it logs the current directory. The specified path can be given relative to the current directory of the CLI. For example typing "FileMan temp" would catalog a subdirectory call temp whose parent is the current directory. In addition a wildcard can be appended to the specified path. "FileMan df0:*.txt" would catalog the volume in df0: and would apply the wildcard pattern *.txt. Side Note: specifying a wildcard pattern of * can be used to select a cataloging mode of "All Subdirs" regardless of the setting within the configuration file (see Catalog Mode under the Project menu). Note: When using the program on a harddrive, the stack should be set to around 10000 (this worked for 2000-2500 files on a single device but more may be needed if the number of files is greater). Movement: As with most everything, moving the highlight bar (cursor) around the directory and file windows can be accomplished with the keyboard or the mouse. In both directory and file windows, the Up and Down arrow keys and Numeric Keypad keys 8 and 2 will move the cursor up and down respec- tively; Numeric Keypad keys 9 and 3 and Shift Up and Down arrows will move the cursor first to the top or bottom of the window and then to the next "page"; Numeric Keypad keys 7 and 1 and Alt Up and Down arrows will move the cursor to the top or bottom of the tree or filelist; in the file window Numeric Keypad keys 4 and 6 and the Right and Left arrows will move the cursor accordingly. Pressing Return will toggle between the directory and file windows. Clicking the mouse button while in either the directory or the file window will expand and move the cursor to that window. The cursor will follow the mouse while the mouse button is depressed. Double clicking the mouse on a file will tag/untag the file. Double click with hold will drag tag/untag the files. Side note: There are invisible screen depth gadgets in the upper right corner of the screen. Operations on Multiple Files: All multi-file operations only affect files that are visible, that is, they must match the current wildcard pattern. Therefore, if a wildcard is in effect a "Tag All Files" command would only tag the files that match the existing wildcard pattern. Likewise, if a set of files is tagged and a new wildcard is specified and then all tagged files are deleted, only the visible files will be deleted, not the ones that are unseen due to the presence of the wildcard filter. Protection Bit Patterns: Protection bit patterns are specified in an input string with the form +w+x+y-z... Where w,x,y,z are any of the protection bits H,S,P,A,R,W,E,D. For example "+A" will specify all files that have the archive bit set, "-a+s" will specify all files that don't have the archive bit set but do have the script bit set. Note that this input is not case sensitive. Wildcard Patterns: Wildcard patterns function in the following manner; A '?' character is used to indicate any single character, '#?' and '*' are used to indicate any number of characters. If the first character in the pattern is a minus, '-', character then all files that don't match the pattern will be displayed. Requesters: This program uses it own requester system. It is fully mouse or keyboard driven. The Spacebar and the Tab key are used to step through the available options. The Return key will accept the currently selected gadget. The first capitalized letter in each gadget specifies the key used to select that gadget. The requester always attempts to appear so that the default selected gadget is under the mouse pointer. String Gadgets: All string input requesters can be aborted by pressing Return with an empty string field, but, the easiest way to abort a string gadget is to press the ESCape key at any time. Path Duplication: Both Copy and Move operations can be performed so that the directory structure of the tagged files is duplicated in the destination. This is done with while in List All files mode (see the Device/ Dir menu) by selecting Copy Tagged/Dirs or Move Tagged/Dirs from the File menu. There are two modes of path duplication, full path or not. Full path duplication will duplicate the directories that are parents to the tagged files all the way back to the root directory of the source volume. Otherwise, only the directories that all the tagged files have in common are duplicated. Continuing a Copy to a Second Destination: When a group of files is copied it is possible that they will not all fit on the destination volume. When this happens it is possible to continue the copy on a second destination. When the "Disk Full" requester appears select "Cancel" and then if an error requester appears select "Abort", then the utility will ask if all files that copied should be untagged, select "Yes". This will leave tagged only those files that have not been copied yet. Select Copy Tagged or Copy Tagged/Dirs again to continue the copy. Note that this will not work for Move operations. The Project Menu: Start Over (Alt-A) - Prompts for the name of a new path to be scanned. All existing directory trees are forgotten/erased. Display Mode (F) - Selects between four different file display modes: - Four column mode with the first 11 characters of each filename. - Three column mode, with the first 15 characters of each filename. - One column mode with the first 21 characters of the filename, the size in bytes, the date, and the time for each file. - One column mode with all characters of the filename, the size in bytes, and the protection bits for each file. Catalog Mode (Alt-L) - Toggles the way in which the utility reads in new trees (see the Device/Dir menu under Add/Log). If set to "One Dir", only the files and subdirectories in the specified directory are cataloged. All subdirectories are not. If set to "All Subdirs" all files in the specified directory and all its subdirectories are cataloged. Wildcard Select (W) - Used to specify a wildcard pattern used to filter the filenames displayed in the file display window. It doesn't prevent files from being cataloged, just from being displayed or tagged. For more information see Wildcard Patterns and Operations on Multiple Files under General Information. Wildcard Off (Ctrl-W) - Turns off any active wildcards. Quit (Q) - Used to exit the program. Device/Dir (Tree) Menu: Switch (F1/F2) - All directory trees, once cataloged, are kept in memory in a circular list. This option is used to switch to the NEXT and PREVIOUS tree in the list. Add/Log (A) - Used to add (catalog) a new directory tree. The user is prompted for the name of a path. Any device or defined path is acceptable. This path becomes the root of a new tree. Expand (Alt-X) - Expands (reads in) all subdirectories of the current tree which have not already been expanded. These subdirectories are expanded to their deepest levels. Free (Alt-F) - Frees the current directory tree from memory. If the last tree is freed the program will exit. List All (L) - Lists all files cataloged in the current directory tree (that match the existing wildcard pattern) at one time in the file display window. All files in all subdirectories are shown. List Tagged (Ctrl-L) - Lists all tagged files cataloged in the current directory tree at one time in the file display window. All tagged files in all subdirectories are shown. Sort (Alt-S) - Used to select the method that files are sorted by in the file display window: alphabetical, by date, or by size. Each dir- ectory tree keeps track of its own sorting mode. Alphabetical mode defaults to ascending order. Date and size default to descending order. All new directory trees, when cataloged, will be sorted according to the last mode chosen here. Order (Alt-O) - Used to control the order in which filename sorting is performed, ascending or descending. The order changes automatically when the sorting method is changed. Tag All (Ctrl-T) - Tags all the files on the current directory tree for multi-file operations. Tag Prot Bits (Alt-T) - Tags all the files in the current directory tree that have protection bits that match a specified pattern (see Pro- tection Bit Patterns under General Information). Untag All (Ctrl-U) - Untags all the files on the current directory tree. Untag Prot Bits (Alt-U) - Untags all the files in the current directory tree that have protection bits that match a specified pattern (see Protection Bit Patterns under General Information). Dir Menu: Destination (F10) - Stores the path to the currently highlighted directory in the destination path string. The next time an operation is performed that needs a destination path the user only has to press return to accept this as the destination. Expand One Level (X) - Expands or re-catalogs the current directory to the first level. In other words if there is a directory shown on the tree that has never been read in or was changed by another tool and needs to be read in again simply move to the highlight bar to that directory and select this menu item. Expand All Subdirs (Ctrl-X) - This is same as the above only this also catalogs all subdirectories of the specified directory. Free (Ctrl-F) - Frees from memory all the files in the current direc- tory, essentially un-cataloging the directory. This is useful if it is desired to no longer have the files in a directory included in the Show All Files mode. Delete (D) - Used to entirely delete the current directory including all files and subdirectories. If the directory is not empty to begin with, the user will be prompted to verify this operation. If the directory has not already been cataloged (expanded) then this oper- ation will only work if it is empty . USE WITH CAUTION!!! Make (M) - Used to make a new directory. The input string behaves very much like it does for the AmigaDOS MakeDir command. For example: "DF0:TEMPDIR" will attempt to create a directory on df0: with the name TEMPDIR while "TEMPDIR" alone will create a directory beneath the one currently highlighted on the directory tree. Unlike AmigaDOS, however, typing "TEMPDIR1/TEMPDIR2" will create both TEMPDIR1 and TEMPDIR2 if necessary. Directories can also automatically be created at any destination path prompt by simply typing the name of the desired path even though it doesn't yet exist. The program will state that the specified path was not found and will ask whether it should be created. Move (Alt-M) - Moves (cuts/prunes) a directory and all its files and subdirectories anywhere else on the same physical volume, just like the rename command in AmigaDOS. To move a directory to a different volume it is necessary to use the "Move All Tagged and Duplicate Paths" command found under the File menu. Rename (R) - Allows the user to rename the current directory. This can be used to simply change the case of the letters in the filename. Note that this version currently will not allow the renaming of a directory tree's root directory. Tag (T) - Tags all the files in the currently highlighted directory for multi-file operations. Untag (U) - Untags all the files in the currently highlighted directory. File Menu: Archive Add/Create (Ctrl-A) - Adds to the specified archive file, in the current directory, all files that are tagged. The extension given in the archive filename determines the archive utility invoked (ARC => Arc, ZOO => Zoo, LZH => LHArc, etc.) Archive Extract (X) - Extracts all files from the current archive file. The files are placed in a new subdirectory created in the current dir- ectory. The extension given in the archive filename determines the archive utility invoked (ARC => Arc, ZOO => Zoo, LZH => LHArc, etc.) Note: this command is the same as Execute if the file does not have an archive extension. Copy File (C) - Used to copy the current file. The user is prompted for the destination path and then the name of the destination file (the original filename is the default). Copy Tagged (Ctrl-C) - Copies the all files that are tagged in the file display window. The user is prompted for the destination path where the files will be copied to. A status window is displayed during the operation. The ESC key is used to abort. Copy Tagged/Dirs (Alt-C) - This works like "Copy Tagged" but it also duplicates all of the paths that the tagged files have in common. This is usually used while in "Show All Files" mode since only in that mode can files in different directories be viewed at the same time. Move File (M) - Used to move the current file. The user is prompted for the destination path. This works whether the destination directory is on the same volume as the source file or a different one. Move Tagged (Ctrl-M) - Moves the all files in the file display window that are tagged. The user is prompted for the destination path where the files will be moved to. A status window is displayed during the operation. The ESC key is used to abort. Move Tagged/Dirs (Alt-M) - This works like "Move Tagged" but it also duplicates all of the paths that the tagged files have in common. Delete File (D) - Used to delete the current file. The user is prompted to make certain that the operation is desired. Delete Tagged (Ctrl-D) - Deletes the all files in the file display window that are tagged. The user is prompted to make certain that the operation is desired. A status window is displayed during the operation. The ESC key is used to abort. Execute (X) - Executes the current file as if it was run from the CLI. Note that ... Rename File (R) - Used to rename the current file. Simply changing the case of the letters in the filename is allowed. Rename Tagged (Ctrl-R) - Used to rename all files in the file display window that are tagged. Entering an empty string for any filename will abort the operation. Print (P) - Copies the current file to the PrinterDevice specified in the configuration file. The PrinterPrefix string is sent first, then the current file, and finally the PrinterSuffix. See Customization for more information. Prot Bits File (B) - Allows the user to change the protection bits on the current file. For more information see Protection Bit Patterns under General Information. Prot Bits Tagged (Ctrl-B) - Allows the user to change the protection bits on all files in the file display window that are tagged. For more information see Protection Bit Patterns under General Information. Edit File (E) - Invokes a specified editor on the current file. The name and path of the editor can be defined in the FileMan.def file (see Customization). Edit Tagged (Ctrl-E) - Invokes a specified editor on up to 16 tagged files. The editor must support multiple filename arguments. The name and path of the editor can be defined in the FileMan.def file (see Customization). Show IFF File (S) - Invokes a specified IFF viewer on the current file. The name and path of the IFF viewer can be defined in the FileMan.def file (see Customization). Show IFF Tagged (Ctrl-S) - Invokes a specified IFF viewer on all tagged files. The editor must support multiple filename arguments. The name and path of the IFF viewer can be defined in the FileMan.def file (see Customization). View Text File (V) - Invokes a specified text viewer on the current file, or, if the file is an archive, the appropriate archive utility will be used to "view" it. The name and path of the text viewer and archive utilities can be defined in the FileMan.def file (see Custo- mization). View Text Tagged (Ctrl-V) - Invokes a specified text viewer on all tagged files, or, if a file is an archive, the appropriate archive utility will be used to "view" it. The name and path of the text viewer and archive utilities can be defined in the FileMan.def file (see Customization). Zap Bytes (Z) - Invokes a specified byte zap utility on the current file. The name and path of the utility can be defined in the FileMan.def file (see Customization). Set Time (=) - Sets the Date/Time of the current file to the current date and time. This is useful for fixing files with bizzare dates. Tag File (T) - Tags the current file. Note that this is not a menu item but can be achieved by double clicking the mouse on an untagged file or by pressing the T key. The space bar can also be used to toggle the tagged state of a file. Tag All (Ctrl-T) - Tags all files in the current directory for multi- file operations. Note: files that do not match the wildcard pattern are not tagged. Tag Identical (Ctrl-I) - Tags all files that have an identical file in both name and size somewhere else on the same directory tree. This operation serves no purpose outside of "show all files" mode. Tag Prot Bits (Alt-T) - Tags all files in the current directory that have protection bits that match a specified pattern (see Protection Bit Patterns under General Information). Tag Wildcard (Alt-W) - Tags all files in the current directory that match a specified wildcard pattern. Untag File (U) - Untags the current file. Note that this is not a menu item but can be achieved by double clicking the mouse on a tagged file or by pressing the U key. The space bar can also be used to toggle the tagged state of a file. Untag All (Ctrl-U) - Untags all files in the current directory. Note: files that do not match the wildcard pattern are not untagged. Untag Prot Bits (Alt-U) - Untags all files in the current directory that have protection bits that match a specified pattern. Customization: All user options are specified in the fileman.def file which must be placed in the s: directory. This file is not absolutely required but is necessary for proper customization of the File Manager utility. The file is in a text format and can be changed with any text editor. The utility's text parser looks for the keywords defined below and any text associated with those keywords. All other text in the file is ignored (useful for commenting). The keywords are not case sensitive. Equal signs and commas are considered "white space" and are ignored. BitPlanes - This defined the number of bit planes to be used. The only two valid options are 2 and 3 yielding 4 and 8 colors respectively. The default is 2. Color0 through Color7 - These define the RGB values of the screen's color registers. These default to the workbench colors. The following set of keywords define which of the color registers is to apply to each area of the display. The default value is listed in brackets. BackColor - background screen color [Color0] BorderColor - screen border color [Color1] FileColor - color of the untagged filenames [Color1] FileInfoColor - color of the file information (right side of display) [Color1] LeafColor - color of the directory names if they are cat- aloged [Color2] SelBackColor - background color of the select bar (cursor) [Color3] SelForeColor - foreground color of the select bar [Color1] SelTagColor - foreground color of the select bar when on a tagged file [Color0] SubTitleColor - color of information field names [Color2] TagColor - color of the tagged filenames [Color2] TitleColor - color of the information block titles [Color3] TreeColor - color of the directory tree trunk and uncataloged directory names [Color3] FileDisplayMode - This is used to define the default method of dis- playing files. Valid values are 0 through 3. The default is 0. See the Project menu under Display Mode for more information. LogAll - This is a flag that specifies how deep to catalog directories. The default is FALSE. See the Project menu under Catalog Mode for more information. PrinterDev - This defines the name of the printer device to use when printing a file. The default is "PRT:". PrinterPrefix - This defines a string to be sent to the printer immedi- ately prior to sending the file. Note that it may be necessary to put ESC and other special ASCII characters directly in the file to achieve desired results. Use your favorite editor or byte ZAPper to do this. PrinterSuffix - This defines a string to be sent to the printer immedi- ately after sending the file (such as a FORMFEED). The following four keywords define the name of certain utilities to be run from the File Manager. Some utilities need to have quotes around the filenames that they operate on (if the filenames contain spaces), while others cannot have quotes because they consider them part of the filename. For this reason, placing a double quote pair ("") at the end of the line is used to indicate that the utility being defined will accept quotes. TextEditor - Defines the name of the program to be executed in order to edit a text file. ByteEditor - Defines the name of the program to be used as a byte zapper (hex/binary file editor). The default is "Zap". IFFViewer - Defines the name of the program to be used to view IFF picture files. The default is "ShowIFF". TextView - Defines the name of the program to be used to view text files. The default is "More". DefArcA - This is used to define an archive Add/Create command. The first field after DefArcA on the line will define the filename extension that this new definition applies to. Following that is the archive command to be used. For example "DefArcA LZH LHArc a" defines the filename extension "LZH" using "LHArc a" as the command to perform archive Add/Create. Up to ten archive Add/Create commands can be defined. DefArcV - This is the same as above but defines the command to use for viewing an archive. DefArcX - This is the same as above but defines the command to use for extracting an archive. If desired, a binary file editor can be used to change "s:fileman.def" to any desired pathname. There is a 32 character buffer allotted for this purpose. Legal Stuff: Copyright (c) 1989,1990 ATomMik Software, All Rights Reserved. FileMan is shareware software. It may be freely distributed so long as it is unchanged, and this document is distributed with it. If you like FileMan and use it regularly a contribution of $15 would be appreciated. If used in a commercial environment, $25 is requested for each machine it is used on. Please send contributions to me at the address shown below. I make no warranty of any kind on the this program but will endeavor to promptly find and fix any bugs reported. Source code for ALL of FileMan is not available, but portions of it, such as the customized input requester system, can be. Mike Crews 14865 Grassmere Ct Chesterfield, MO 63017 GEnie Mail Address - M.CREWS4 CompuServe ID - 71425,1754 PeopleLink ID - OHS964