trb@stag.UUCP (05/26/87)
The following is a very loosely thrown together set of documentation/update notes for the HDSCAN Shareware version 1.3 that I just posted to the net. Have fun.... -Todd Burkey ...ihnp4!meccts!zeke!stag!trb -------C--U--T-----H-E-R-E--------------------------------------- HDSCAN Shareware Ver. 1.3 (The ST Hard Disk Utility) (c) 1987 by Todd Burkey Note: This documentation must be included in an ARC file with the HDSCAN program if you wish to distribute the program on BBS's or Club Disks. Any modification of the program or this document is expressly forbidden. HDSCAN 1.3 is Shareware. HDSCAN Professional is not! This documentation covers the features of both the shareware version as well as the Professional one to give you an idea of the different features. DISCLAIMER: I spend all my money on computers that outdate themselves within a year, so I really don't need a disclaimer...although with GEMDOS and the XBIOS occasionally doing undocumented things, I should say that "LET THE USER BEWARE". There. Safe. INTRO: Whew, even with the bugs and poor documentation on the ST, I think this program was easier to write on the ST than any computer I have had (MAC, AMIGA, IBM PC, and CP/M). Basically, HDSCAN started out with my developing a set of window region scrolling routines and then trying to figure out what to do with them. I had been waiting for a product to come out like XTREE or PCTOOLS (IBM PC programs), or even a PD program like SWEEP. Anything to make dealing with my hard disk easier. Since I had a lot of requests to make DISKTOP support hard disks (and I really didn't think that would be useful), I decided to go ahead and try to write my own utility. Special thanks to whoever wrote BLASTER, since seeing it scan the hard disk so quickly got me on the right track for this program (HDSCAN will typically read a 30 meg drive...all partitions...in around 3 seconds or so, gathering file names, sizes, dates, paths, etc.) I will keep this file short, since HDSCAN does have a help key. HDSCAN is first and foremost a utility that lets you tag files throughout your hard disk and then copy (or erase) them in one pass. Because I got carried away, HDSCAN also lets you hexdump any file on the hard disk, view any file (even binary files if you like), rename a file, show the free space on drives A and B, select for display files matching a specific string (i.e. to just see all file names that have NEO in them), select just files in one directory, select all the files on all partitions of the hard disk to scroll through, and more that will make sense when you try out the program. Recently added features allow you to view the contents of arc files, arc all Tagged files together into one file, edit a file at the press of a key using your own favorite .tos/.ttp editor (i.e. me.tos), and even run any TOS program you want by pressing a user-definable function key (F1 to F10). This latter feature really opens up a lot of possibilities. You can, for example, assign LESS.TTP to the F10 key and then every time you press F10, HDSCAN will pass the full path of the file you are currently scrolling over to the LESS.TTP program. Or, you could assign PCOMMAND to the F1 key and drop into a PC DOS like shell at the touch of a key. My favorite is assigning TINYLOOK.TTP to the F10 key. That progam loads in a tiny picture, switchs resolution, shows the picture, and then pops me back into HDSCAN where I can Tag the picture for future deletion or mass copying! Get enough auxillary programs set up under HDSCAN and you won't spend much time searching through the desktop again! And all that is Shareware. I am really trying hard to put as much into the PD version to give people a useful tool. Version 2.3 is not public domain (I have to make a living some way or other) and has some embellishments that I think most of you will appreciate. In 2.3, you can sort by date, name, and size all the selected files in ascending or descending order. For example, you can select all PAS files (all partitions), sort them by reverse date, then easily tag all the new files for copying to floppies. Or maybe sort the entire drive by name to help find duplicate files (this will make more sense when the 40 folder limit get fisxed). The sort in 2.3 is a recursive quicksort, so even a thousand items will be sorted in a few seconds. Even already sorted stuff won't slow down my version of the qsort (Quicksort'ing sorted data is usually horribly inefficient unless it is randomized first.) 2.3 also has a file compare capability, just in case you can't remember if a file is really a duplicate. Finally, 2.3 will better support people who want to use HDSCAN to reorganize their hard disks...with stuff like auto regeneration of the arrays after a mass copy from hard disk to hard disk, and hard disk 'DISKINFO' style info updated on the fly to keep things organized. USING HDSCAN: HDSCAN works best if you have a hard disk. After a bit of soul searching I added floppy support as well. If you don't have a hard disk, or do and want to read off of floppies as well as the hard disk, create a file called: HDSCANAB.DAT in the directory you run HDSCAN from (the file can be empty or have data in it, HDSCAN just looks to see if the file exists so that it knows whether to bother you with prompts or not). If you plan on looking at arc files while in HDSCAN, be sure ARC.TTP is in the directory as well. Also, if you want to do any file editing, copy me.tos into the directory as well (the name is hardcoded-you can rename your favorite editor to that name or simply reassign one of the function keys to call up your editor.) If you want to use external programs, modify the file called HDSCAN.KEY which is included in the HDSCAN release. The format is very simple, one function key per line in the format of: F1=C:\BIN\WC.PRG F2=D:\PICTURE\TINYLOOK.TTP etc.. If you don't own a hard disk, the best thing to do is to create a RAM disk on drive C and copy HDSCAN.PRG, HDSCANAB.DAT, HDSCAN.KEY, ARC.TTP, ME.TOS, and all of the 'External' programs you plan on running to it. This makes everything lightning quick and should make perusing your floppies a breeze. I even do the same thing if I plan on looking at pictures. To run HDSCAN, double click on HDSCAN.PRG and a screen will appear in front of you. I don't use GEM windows for speed reasons, so I will explain here what you are looking at. Most noticable on the screen will be a tall box near the right of the screen filled with file names. That is the 'selected file' window and you can scroll up and down through all selected files with the arrow keys and the [HOME] and SHIFT [HOME] keys to quickly get to a file. The file you are currently selecting will be highlighted. As you scroll through the files, you will notice that the directory the file is in, its' size, and its' date, are automatically updated in windows near the top left of the screen. Next to the file size window is a window that will make more sense later. It displays the total size of all tagged files. This proves useful when you are moving around the hard disk, deciding which files will fit on which floppies. Below the these two windows is a long window used for prompts. Look in this window if you aren't sure why something isn't happening...it might be asking you a question. Below the prompt window is a big free space which I am sure will eventually get filled up. Right now it is useful as a billboard. Below that is a status line that basically tells you 1) what you have selected (i.e. ALL will appear if all partitions are chosen, DIR will appear if you have selected a single directory to work in, and a string of 1-8 characters will appear if the selection was made using a wildcard string search), 2) the sort order (always RANDOM for 1.0 users, although, if your hard disk isn't too fractured, the files will be somewhat alphabetical), and 3) the number of selected files. TAGGING STuff: A few more things and you will be all set to go. First, tagging. To tag a file, simply scroll to the file you want and press the 'T' key. You will see a '*' appear in a little scrolling region next to the file name and the file window will scroll to the next file (so you can just keep pressing T to select a bunch of file.) sAs each file is tagged, you will see the total tagged size increase in the TOTAL TAGGED window. To untag, a file, just use the 'U' key. To untag all files, type ALT U. For my own sanity, I chose to show the directory names in the file window as well (they have a 'D' next to them, so you can't accidentally tag or delete them.) SEARCHING AND SELECTING STuff: Most of the time, you will probably just want to search out a few files for tagging and don't want to scroll over all 1000 or so files on the hard disk. To save some time, if you press the 'S' key, you will be prompted for a <9 character string to search for (you can enter stuff like NEO, PRG, READ, etc but no *, ? wildcards are supported...also it doesn't allow you to enter a '.' as part of the string.) Also, you might only want to select the files in one directory. To do so, pressing the TAB key will turn the PATH: window into a little scrolling region allowing you to use the arrow keys (up/down) to quickly choose the appropriate directory. When exitting the TAB key option, you are given the choice of pressing TAB (to select all the files in the currently selected directory) or A (to select all the files in all directories below and included the currently selected directory.) Every once in a while, you may want to regenerate the list of files (i.e. you have been doing some heavy deletes and don't care to see the 'X'ed out deleted files on the file list anymore). To do so, just press the ! key. Note that this command will let you switch floppies and also will let you see the results of all the copying TO the harddisk you have been doing. Note, this command automatically deselects everything. DANGEROUS STuff (Copy/Erase all Tagged files): Once you have everything selected, pressing the 'M' key will invoke the mass copy routine. This will prompt you for the destination path and allow you to copy all tagged files (with or without an interactive query on each file). Once copied, the '*' next to a file name will become a '#' to show that the copy was successful. If you later want to re-tag the '#' files, possibly for mass erase ('E' key), you can do so by pressing the ALT T keys. Note: to erase just one file, place the scroll bar over the file and press the D key. VISUAL STuff (Viewing and Dumping files): One nice feature of HDSCAN is that by pressing the 'V' key, you can view the file that you are currently selecting in the file window. The view option does a character by character analysis of the file, just displaying the ascii printable characters on the screen, so it can be used for looking for strings in a binary file. Note that because I chose to allow looking at binary files, I also turned off highliting (ESCp/ESCq) and tabbing that sometimes appears in files. If you want to get a HEX dump, press the 'H' key and you will get a page by page listing of your file in both HEX and ASCII. If you have ME.TOS in the same directory that you ran HDSCAN from, you can invoke the editor on the file you are currently pointing at in the scroll window by pressing the '*' key (shifted 8). ME.TOS will load in, read in the file, allow you to edit and save the file, and then return you to HDSCAN when you are done. ARC STuff: To get a verbose listing of the contents of an ARC file, move to the file you want to look at and then press the = key. While the verbose listing is being displayed, you can press the CTRL-S key to pause the listing and the CTRL-Q key to continue the listing. To add all Tagged files to an ARC file, just move the scroll bar over the arc file you want to add the Tagged stuff to and hit the + key. You will be asked for a path name (in case you want to add to an ARC file that doesn't exist) and you can either hit return (to select the file you were scrolling over, or type in the full pathname of the file you want to create or add to (i.e. C:\TEST\PICT1.ARC is a full pathname). The tagged files will then be arc'ed together. NEAT STuff: These features are, of course, found in the non-PD version of HDSCAN. HDSCAN Professional allows you to sort all selected files (don't confuse tagged with selected...selected files are simply everything you can currently scroll past in the file name window, whereas tagged files are those you have tagged with the T key for some future purpose.) By pressing the O key, you will tell HDSCAN that you wish to sort the selected files. HDSCAN will prompt you for the sort key (S-Size, N-Name, D-Date) and then for whether you want to see the sort in ascending or descending order (descending date is a useful way to tag what has changed since your last backup...specialy if you are currently selecting all partitions of your hard disk at once!) Ascending name is useful to find all those duplicate files. One note on sorting: I always fall back to RANDOM order when you do a new selection by either search (S) or directory select (TAB). This provides the fastest response assuming you aren't always wanting to see the stuff sorted. The other important feature added to the Professional version is the file compare option. This feature allows you select a file for comparing by pressing the ALT-C keys. When you do so, a C will appear next to the file name and you will be prompted to go find another file to compare it against. When you have the scroll bar over the other file, press ALT-C again and the two files will be compared. For sanities sake, I will just show the first 15 differences (byte locations and values) that the program finds. Note that you can do any number of file searches and directory matches in between selecting the first and second compare files. Other features will be added to the Professional version as people convince me that they need them. POWERFUL STuff: Because I got tired adding features to the program and it was getting big, I decided to add one more feature. This is probably the most powerful feature (and the most confusing) as well. I decided to make the F1-F10 keys into user definable keys. I have mentioned already how to create the HDSCAN.KEY file, so will only mention here that to use the program you have assigned to the key, just press the appropriate function key. If you forget what the key assignments are, just press the ? key and you will be given a listing of the keys (along with a summary of disk space). Be very careful not to run a GEM window type program from within HDSCAN, as you could end up totally garbaging up the HDSCAN display upon return from the program. Currently, I have run the following programs from within HDSCAN with no ill effects: ARC.TTP, ME.TOS, TINYLOOK.TTP, WC.PRG, OD.PRG, LESS.TTP, MORE.TTP, GALAXY.TTP, LINE3.PRG, DCOPY17.TOS, PCOMMAND.PRG, and a variety of other shells and even a few terminal programs. This is just using the GEMDOS Pexec call, so no fancy code is involved. NOTE: if you are writing an utility to use as a HDSCAN 'External' program, remember that the string that is passed in from HDSCAN contains the complete directory path with the file name you are pointing to, so be sure to allow sufficient character space (127 chars max). FINAL Stuff: Finally, to rename a file, just hit the 'R' key and type in the new name. The file name you are currently selecting in the file window will be renamed. I hope that I have covered all the basics about the commands in this short document. Check out any Read.me files for further information. Three words of caution before you continue. First, while copying, HDSCAN does not check to see if the destination file already exists...it will just overwrite the destination file. Second, I don't do any bounds checking on input, so if you feel you must have long directory names that require you to type in over the scroll window graphics, go ahead. You can't hurt anything that pressing the HELP key twice won't solve. I know that I should really go in and prevent that from happening, but this program was designed not to be restrictive and should allow you to use it in ways I haven't planned for yet (planning for the unplanned?) Also, be careful about using the 'E' key. If you tag some files in one directory, then do a search for some other files and tag some of them, be aware that the previously tagged files will also get erased (unless you un-tagged them of course). Just because you can't see the file anymore in your currently selected subset of the disk does not mean it isn't tagged (that will be obvious, actually, if you look at the total tagged window). Happy computing... HDSCAN 1.2/2.2 RELEASE NOTES - New Features: The 'B' Key option - I added a 'B' key option that goes through and groups all files into disk order, rather than the RANDOM order that you will see files in upon running HDSCAN. The RANDOM order is actually the same tree order the files appear in your FAT tables, so they are actually already clustered together within their respective subdirectories. It is just that as your hard disk gets more fractured due to erasing and moving files around, your FAT tables will get messier and messier (I am not being personal, FAT stands for File Allocation Tables). After you get used to viewing the disk via using the match, directory select, and/or sort (hint, hint) options, you will probably never even bother using the 'B' key. Currently known bugs/limitations: 1) if you run a gemdos program, or anything that uses with the mouse, via the user-definable function key options, HDSCAN may have wierd things happen to its' graphics. This is a feature/bug of GEM's pexec and GEM itself as far as I can tell, so until someone explains what is up, HDSCAN will retain this limitation. (Actually, this won't be a problem for most users.) 2) if you have a directory path (i.e. C:\PICTURES\DEGAS\ELITE\TINYED\...) that is more than 127 characters long, you won't be able to run any external programs on that file. This is a Pexec limit and you will probably run into problems with other things if you keep it that long anyway, so I have no workaround plans for that. 3) one other limitation is that if you have more than 2500 files on all your hard disk partitions, HDSCAN will tell you so and stop. I have a messy hard disk, and even on my PC with 40 megs of ST BBS stuff, I would only have around 1800 files, so I am sticking with this limit until people start to complain. (Actually, the ST starts doing wierd things when you get too many files in a set of folders anyway...try opening up 4 folders on the desktop, each with 100 files in it, and then adding files to the folders...strange TOS errors.) HDSCAN 1.22/2.22 RELEASE NOTES - New Features: Well, as luck would have it, some people out there are braving the 40 folder limit and using 120-150 folders on a hard disk. So this version has been set up with the following features: 1) You can have up to 199 folders. 2) You can have up to 2500 files. 3) You can now tell HDSCAN what drives to read and in what order (so even if you have more than 199 folders, you can still use HDSCAN....) 4) Some new hidden options to create directories and to turn write verify on/off. Two new commands: Write verify-To turn write verify on, press the 'w' key. To turn verify off, press the 'W' key (uppercase w). Create Dir - To create a directory, just press the ~ key. You will be prompted for a directory name. You can type in the complete path of the directory you want created (i.e. D:\DEGAS\PICTURES) or if you are already inside the directory you want to create the new dir in, just prefix the name of the new directory with a ~ character (i.e. if you see D:\DEGAS up in the PATH window, just type: ~PICTURES to achieve the same thing as typing D:\DEGAS\PICTURES). And one new option: Drive select-HDSCAN normally selects the drives by searching from drive 'C' up to the first drive that doesn't appear in the drvmap. (ala old IBM PC programming style). Some people out there decided to make their hard disks C, D, G, H, etc and were surprised to find out that HDSCAN only found drives C and D. To solve this, create a file called HDSCAN.DRV and put one line of letters in the file-each letter indicating the respective drive you want loaded. For example, the following line in file HDSCAN.DRV: HABCDG would load my ramdisk contents (drive H) first, then my two floppy drives would be scanned, followed by drives C, D, and G. Crude, but it is something you won't be changing often, so it's better not to have to be prompted for it by the program... ps...if you are using an non-standard hard disk driver (i.e. aythinng not apropved by Atari) and HDSCAN fails, please drop me a line explaining the configuration. All this program does is perform sector reads to obtain the standard drive cluster info, so more programs than this one may end up giving you grief if that is the case. I do know it will fail if you have an unreadable ram disk (i.e. it is deleted, but still in your drvmap). HDSCAN 1.3/2.3 RELEASE NOTES - New Features: 1) Pressing O (instead of o) for ordering the file names by size, date, or name will maintain that sort option through all the subsequent file reselects...until another O or o option is used. 2) Pressing M (instead of m) will mass copy files as before, but the file attributes and file date of the source file will be transferred to the destination file (better for backups). 3) Pressing S (instead of s) will allow you to Set a file match as before, but S will cause the match to occur only within the currently selected subset of files. This will allow you to easily narrow in on a set of file names. 4) The s/S (Set match) option also now allows you to type in * to select all Tagged files and even supports an 'extension' search option. If you type in .pas or .c after selecting the Set match option, hdscan will search for whatever extension you typed after the '.'. Note that the `.` must be the very first character. 5) Copying files now features a mechanism whereby you will be prompted to insert a new disk if your destination drive gets full. Only if you are copying to drives A or B, of course. 6) The R option (Rename file) has been extended to allow viewing and changing of the file attributes (Read only, Hide file, System file). I kept this simple by showing the old (default) values in brackets, so you just hit return through the option for now change. 7) Some other diddly stuff like showing how much space is left on the hard disks in the info section, revamping the Help and Info displays to a) fit all the options in, and b) allow those of you with 10 or so drive partitions to see the info on all of them, etc. I didn't come up with a reliable solution to the problem of reading from subdirectories on 'changed' floppies (i.e. if you stick a floppy in the drive after running HDSCAN, the file open process in hdscan will not see the files in subdirectories during copy, even though hdscan itself will show the files!) Hdscan will always show the files on a drive, because it does direct sector reads of the floppies/hard disks, but Gem has this serious problem with not handling changed media very well. To read from a subdirectory on a floppy, just be sure to open up that floppies window prior to running hdscan. Note: hdscan was not originally intended for copying from floppy to hard disk. It is better suited for handling the massive structure of a hard disk and moving files to floppy or other hard disk areas. Send Contributions/Orders to: Todd Burkey c/o Mindtools 3546 Pilgrim Ln Plymouth, MN 55441 If you like the program, use it, and want to help fund further development, please send $10. If you want to order the product version (2.3), it is only $20 (plus 6.00% tax in Minnesota). I will mail it anywhere in the USA/CAN at no extra charge ($3.00 shipping for overseas orders). 5/15/1987 - hdscan ver.1.3 (shareware) and 2.3 (professional)