home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / utility / disk / hdscan / hdscan1.doc < prev    next >
Text File  |  1994-01-01  |  19KB  |  316 lines

  1.                        HDSCAN/HDSCAN Professional  
  2.                        (The ST Hard Disk Utility)
  3.                                (c) 1987
  4.                             by Todd Burkey
  5.  
  6.  
  7. Note: This documentation must be included in an ARC file with the HDSCAN
  8.       program if you wish to distribute the program on BBS's or Club Disks.
  9.       Any modification of the program or this document is expressly forbidden.
  10.       HDSCAN is Shareware. HDSCAN Professional is not! This documentation
  11.       covers the features of both the shareware version as well as the
  12.       Professional one to give you an idea of the different features.
  13.  
  14. DISCLAIMER: I spend all my money on computers that outdate themselves within a
  15.             year, so I really don't need a disclaimer...although with GEMDOS
  16.             and the XBIOS occasionally doing undocumented things, I should say
  17.             that "LET THE USER BEWARE". Oh yes, don't use the program if you
  18.             have more than 2,500 files on a hard disk. There. Safe.
  19.  
  20. INTRO:
  21.  
  22. Whew, even with the bugs and poor documentation on the ST, I think this program
  23. was easier to write on the ST than any computer I have had (MAC, AMIGA, IBM PC,
  24. and CP/M). Basically, HDSCAN started out with my developing a set of window
  25. region scrolling routines and then trying to figure out what to do with them.
  26. I had been waiting for a product to come out like XTREE or PCTOOLS (IBM PC
  27. programs), or even a PD program like SWEEP. Anything to make dealing with
  28. my hard disk easier. Since I had a lot of requests to make DISKTOP support
  29. hard disks (and I really didn't think that would be useful), I decided to go
  30. ahead and try to write my own utility. Special thanks to whoever wrote BLASTER,
  31. since seeing it scan the hard disk so quickly got me on the right track for
  32. this program (HDSCAN will typically read a 30 meg drive...all partitions...in
  33. around 3 seconds or so, gathering file names, sizes, dates, paths, etc.)
  34.  
  35. I will keep this file short, since HDSCAN does have a help key. HDSCAN is first
  36. and foremost a utility that lets you tag files throughout your hard disk and
  37. then copy (or erase) them in one pass. Because I got carried away, HDSCAN also
  38. lets you hexdump any file on the hard disk, view any file (even binary files
  39. if you like), rename a file, show the free space on drives A and B, select for
  40. display files matching a specific string (i.e. to just see all file names that
  41. have NEO in them), select just files in one directory, select all the files on
  42. all partitions of the hard disk to scroll through, and more that will make
  43. sense when you try out the program.
  44.  
  45. Recently added features allow you to view the contents of arc files, arc all
  46. Tagged files together into one file, edit a file at the press of a key using
  47. your own favorite .tos/.ttp editor (i.e. me.tos), and even run any TOS program
  48. you want by pressing a user-definable function key (F1 to F10). This latter
  49. feature really opens up a lot of possibilities. You can, for example, assign
  50. LESS.TTP to the F10 key and then every time you press F10, HDSCAN will pass the
  51. full path of the file you are currently scrolling over to the LESS.TTP program.
  52. Or, you could assign PCOMMAND to the F1 key and drop into a PC DOS like shell
  53. at the touch of a key. My favorite is assigning TINYLOOK.TTP to the F10 key.
  54. That progam loads in a tiny picture, switchs resolution, shows the picture, and
  55. then pops me back into HDSCAN where I can Tag the picture for future deletion
  56. or mass copying! Get enough auxillary programs set up under HDSCAN and you
  57. won't spend much time searching through the desktop again!
  58.  
  59. And all that is Shareware.  I am really trying hard to put as much into the PD
  60. version to give people a useful tool. Version 2.0 is not public domain (I have
  61. to make a living some way or other) and has some embellishments that I think
  62. most of you will appreciate. In 2.0, you can sort by date, name, and size all
  63. the selected files in ascending or descending order. For example, you can
  64. select all PAS files (all partitions), sort them by reverse date, then easily
  65. tag all the new files for copying to floppies. Or maybe sort the entire drive
  66. by name to help find duplicate files (this will make more sense when the 40
  67. folder limit gets fixed). The sort in 2.0 is a recursive quicksort, so even a
  68. thousand items will be sorted in a few seconds. Even already sorted stuff won't
  69. slow down my version of the qsort (Quicksort'ing sorted data is usually
  70. horribly inefficient unless it is randomized first.) 2.0 also has a file compare
  71. capability, just in case you can't remember if a file is really a duplicate.
  72. Finally, 2.0 will better support people who want to use HDSCAN to reorganize
  73. their hard disks...with stuff like auto regeneration of the arrays after a mass
  74. copy from hard disk to hard disk, and hard disk 'DISKINFO' style info updated
  75. on the fly to keep things organized.
  76.  
  77.  
  78. USING HDSCAN:
  79.  
  80. HDSCAN works best if you have a hard disk. After a bit of soul searching I
  81. added floppy support as well. If you don't have a hard disk, or do and want to
  82. read off of floppies as well as the hard disk, create a file called:
  83.    HDSCANAB.DAT
  84. in the directory you run HDSCAN from (the file can be empty or have data in it,
  85. HDSCAN just looks to see if the file exists so that it knows whether to bother
  86. you with prompts or not). If you plan on looking at arc files while in HDSCAN,
  87. be sure ARC.TTP is in the directory as well. Also, if you want to do any file
  88. editing, copy me.tos into the directory as well (the name is hardcoded-you can
  89. rename your favorite editor to that name or simply reassign one of the function
  90. keys to call up your editor.) If you want to use external programs, modify the
  91. file called HDSCAN.KEY which is included in the HDSCAN release. The format is
  92. very simple, one function key per line in the format of:
  93.   F1=C:\BIN\WC.PRG
  94.   F2=D:\PICTURE\TINYLOOK.TTP
  95.   etc..
  96. If you don't own a hard disk, the best thing to do is to create a RAM disk on
  97. drive C and copy HDSCAN.PRG, HDSCANAB.DAT, HDSCAN.KEY, ARC.TTP, ME.TOS, and all
  98. of the 'External' programs you plan on running to it. This makes everything
  99. lightning quick and should make perusing your floppies a breeze. I even do
  100. the same thing if I plan on looking at pictures. To run HDSCAN, double click on
  101. HDSCAN.PRG and a screen will appear in front of you. I don't use GEM windows
  102. for speed reasons, so I will explain here what you are looking at.
  103.  
  104. Most noticable on the screen will be a tall box near the right of the screen
  105. filled with file names. That is the 'selected file' window and you can scroll
  106. up and down through all selected files with the arrow keys and the [HOME] and
  107. SHIFT [HOME] keys to quickly get to a file. The file you are currently
  108. selecting will be highlighted.
  109.  
  110. As you scroll through the files, you will notice that the directory the file is
  111. in, its' size, and its' date, are automatically updated in windows near the top
  112. left of the screen.
  113.  
  114. Next to the file size window is a window that will make more sense later. It
  115. displays the total size of all tagged files. This proves useful when you are
  116. moving around the hard disk, deciding which files will fit on which floppies.
  117.  
  118. Below the these two windows is a long window used for prompts. Look in this
  119. window if you aren't sure why something isn't happening...it might be asking
  120. you a question.
  121.  
  122. Below the prompt window is a big free space which I am sure will eventually get
  123. filled up. Right now it is useful as a billboard.
  124.  
  125. Below that is a status line that basically tells you 1) what you have selected
  126. (i.e. ALL will appear if all partitions are chosen, DIR will appear if you have
  127. selected a single directory to work in, and a string of 1-8 characters will
  128. appear if the selection was made using a wildcard string search), 2) the sort
  129. order (always RANDOM for 1.0 users, although, if your hard disk isn't too
  130. fractured, the files will be somewhat alphabetical), and 3) the number of 
  131. selected files.
  132.  
  133.  
  134. TAGGING STuff:
  135.  
  136. A few more things and you will be all set to go. First, tagging. To tag a file,
  137. simply scroll to the file you want and press the 'T' key. You will see a '*'
  138. appear in a little scrolling region next to the file name and the file window
  139. will scroll to the next file (so you can just keep pressing T to select a bunch
  140. of files.) As each file is tagged, you will see the total tagged size increase
  141. in the TOTAL TAGGED window. To untag, a file, just use the 'U' key. To untag
  142. all files, type ALT U. For my own sanity, I chose to show the directory names
  143. in the file window as well (they have a 'D' next to them, so you can't
  144. accidentally tag or delete them.)
  145.  
  146.  
  147. SEARCHING AND SELECTING STuff:
  148.  
  149. Most of the time, you will probably just want to search out a few files for
  150. tagging and don't want to scroll over all 1000 or so files on the hard disk. To
  151. save some time, if you press the 'S' key, you will be prompted for a <9
  152. character string to search for (you can enter stuff like NEO, PRG, READ, etc
  153. but no *, ? wildcards are supported...also it doesn't allow you to enter a '.'
  154. as part of the string.) Also, you might only want to select the files in one
  155. directory. To do so, pressing the TAB key will turn the PATH: window into a
  156. little scrolling region allowing you to use the arrow keys (up/down) to quickly
  157. choose the appropriate directory. When exitting the TAB key option, you are
  158. given the choice of pressing TAB (to select all the files in the currently
  159. selected directory) or A (to select all the files in all directories below and
  160. included the currently selected directory.)
  161.  
  162. Every once in a while, you may want to regenerate the list of files (i.e. you
  163. have been doing some heavy deletes and don't care to see the 'X'ed out deleted
  164. files on the file list anymore). To do so, just press the ! key. Note that
  165. this command will let you switch floppies and also will let you see the results
  166. of all the copying TO the harddisk you have been doing. Note, this command
  167. automatically deselects everything.
  168.  
  169.  
  170. DANGEROUS STuff (Copy/Erase all Tagged files):
  171.  
  172. Once you have everything selected, pressing the 'M' key will invoke the mass
  173. copy routine. This will prompt you for the destination path and allow you to
  174. copy all tagged files (with or without an interactive query on each file). Once
  175. copied, the '*' next to a file name will become a '#' to show that the copy
  176. was successful. If you later want to re-tag the '#' files, possibly for mass
  177. erase ('E' key), you can do so by pressing the ALT T keys. Note: to erase just
  178. one file, place the scroll bar over the file and press the D key.
  179.  
  180.  
  181. VISUAL STuff (Viewing and Dumping files):
  182.  
  183. One nice feature of HDSCAN is that by pressing the 'V' key, you can view the
  184. file that you are currently selecting in the file window. The view option does
  185. a character by character analysis of the file, just displaying the ascii
  186. printable characters on the screen, so it can be used for looking for strings
  187. in a binary file. Note that because I chose to allow looking at binary files,
  188. I also turned off highliting (ESCp/ESCq) and tabbing that sometimes appears
  189. in files. If you want to get a HEX dump, press the 'H' key and you will get
  190. a page by page listing of your file in both HEX and ASCII. If you have ME.TOS
  191. in the same directory that you ran HDSCAN from, you can invoke the editor on
  192. the file you are currently pointing at in the scroll window by pressing the
  193. '*' key (shifted 8). ME.TOS will load in, read in the file, allow you to edit
  194. and save the file, and then return you to HDSCAN when you are done.
  195.  
  196.  
  197. ARC STuff:
  198.  
  199. To get a verbose listing of the contents of an ARC file, move to the file you
  200. want to look at and then press the = key. While the verbose listing is being
  201. displayed, you can press the CTRL-S key to pause the listing and the CTRL-Q
  202. key to continue the listing.
  203.  
  204. To add all Tagged files to an ARC file, just move the scroll bar over the arc
  205. file you want to add the Tagged stuff to and hit the + key. You will be asked
  206. for a path name (in case you want to add to an ARC file that doesn't exist)
  207. and you can either hit return (to select the file you were scrolling over, or
  208. type in the full pathname of the file you want to create or add to (i.e.
  209. C:\TEST\PICT1.ARC is a full pathname). The tagged files will then be arc'ed
  210. together.
  211.  
  212.  
  213. NEAT STuff:
  214.  
  215. These features are, of course, found in the non-PD version of HDSCAN. HDSCAN
  216. Professional allows you to sort all selected files (don't confuse tagged with
  217. selected...selected files are simply everything you can currently scroll past
  218. in the file name window, whereas tagged files are those you have tagged with
  219. the T key for some future purpose.) By pressing the O key, you will tell
  220. HDSCAN that you wish to sort the selected files. HDSCAN will prompt you for
  221. the sort key (S-Size, N-Name, D-Date) and then for whether you want to see
  222. the sort in ascending or descending order (descending date is a useful way
  223. to tag what has changed since your last backup...specialy if you are currently
  224. selecting all partitions of your hard disk at once!) Ascending name is useful
  225. to find all those duplicate files. One note on sorting: I always fall back
  226. to RANDOM order when you do a new selection by either search (S) or directory
  227. select (TAB). This provides the fastest response assuming you aren't always
  228. wanting to see the stuff sorted. The other important feature added to the
  229. Professional version is the file compare option. This feature allows you select 
  230. a file for comparing by pressing the ALT-C keys. When you do so, a C will
  231. appear next to the file name and you will be prompted to go find another file
  232. to compare it against. When you have the scroll bar over the other file, press
  233. ALT-C again and the two files will be compared. For sanities sake, I will just
  234. show the first 15 differences (byte locations and values) that the program
  235. finds. Note that you can do any number of file searches and directory matches
  236. in between selecting the first and second compare files. Other features will
  237. be added to the Professional version as people convince me that they need them.
  238.  
  239.  
  240. POWERFUL STuff:
  241.  
  242. Because I got tired adding features to the program and it was getting big, I
  243. decided to add one more feature. This is probably the most powerful feature
  244. (and the most confusing) as well. I decided to make the F1-F10 keys into
  245. user definable keys. I have mentioned already how to create the HDSCAN.KEY
  246. file, so will only mention here that to use the program you have assigned to
  247. the key, just press the appropriate function key. If you forget what the
  248. key assignments are, just press the ? key and you will be given a listing of
  249. the keys (along with a summary of disk space). Be very careful not to run a
  250. GEM window type program from within HDSCAN, as you could end up totally
  251. garbaging up the HDSCAN display upon return from the program. Currently, I have
  252. run the following programs from within HDSCAN with no ill effects: ARC.TTP,
  253. ME.TOS, TINYLOOK.TTP, WC.PRG, OD.PRG, LESS.TTP, MORE.TTP, GALAXY.TTP,
  254. LINE3.PRG, DCOPY17.TOS, PCOMMAND.PRG, and a variety of other shells and even
  255. a few terminal programs. This is just using the GEMDOS Pexec call, so no fancy
  256. code is involved. NOTE: if you are writing an utility to use as a HDSCAN
  257. 'External' program, remember that the string that is passed in from HDSCAN
  258. contains the complete directory path with the file name you are pointing to,
  259. so be sure to allow sufficient character space (127 chars max). 
  260.  
  261.  
  262. FINAL Stuff:
  263.  
  264. Finally, to rename a file, just hit the 'R' key and type in the new name. The
  265. file name you are currently selecting in the file window will be renamed. I
  266. hope that I have covered all the basics about the commands in this short
  267. document. Check out any Read.me files for further information.
  268.  
  269. That's it. Three words of caution before you continue. First, while copying,
  270. HDSCAN does not check to see if the destination file already exists...it will
  271. just overwrite the destination file. Second, I don't do any bounds checking on
  272. input, so if you feel you must have long directory names that require you to
  273. type in over the scroll window graphics, go ahead. You can't hurt anything
  274. that pressing the HELP key twice won't solve. I know that I should really go
  275. in and prevent that from happening, but this program was designed not to be
  276. restrictive and should allow you to use it in ways I haven't planned for yet
  277. (planning for the unplanned?)  Also, be careful about using the 'E' key.
  278. If you tag some files in one directory, then do a search for some other files
  279. and tag some of them, be aware that the previously tagged files will also get
  280. erased (unless you un-tagged them of course). Just because you can't see the
  281. file anymore in your currently selected subset of the disk does not mean it
  282. isn't tagged (that will be obvious, actually, if you look at the total tagged
  283. window). Happy computing...
  284.  
  285.         -Todd Burkey
  286.          BBS: 612-542-8980 (20+megs of STuff online)
  287.  
  288.  
  289.          Send Contributions/Orders to:
  290.  
  291.          Todd Burkey
  292.      c/o Mindtools
  293.          3546 Pilgrim Ln
  294.          Plymouth, MN 55441
  295.  
  296.          If you like the program, use it, and want to help fund further
  297.          development, please send $10. If you want to order the product
  298.          version (2.0), it is only $20 (plus 6.00% tax in Minnesota). I
  299.          will mail it anywhere in the USA/CAN at no extra charge ($3.00
  300.          shipping for overseas orders).  
  301.  
  302.  
  303. A word of caution to other people writing software out there. I had a real fun
  304. time working around the bios/gemdos bug/feature that makes the GEMDOS buffer
  305. fill up when you read keyinput with Bconin(2) calls. I tried playing around
  306. with the head and tail pointers in IOREC and even had a messy method working
  307. where I was constantly adjusting the key repeat rate, until someone steered me
  308. to eating the 'type ahead' key presses with : while(Cconis()!=0) Crawcin();
  309. placed at strategic portions in my code. What a mess. If you want to see what
  310. happens if you just do a Crawcin()/Gemdos(7) call, just try holding ctrl-V down
  311. in some of the EMACS editors on a big file (got at least 10 bombs when I did
  312. that).  Or you can try it on my 'V'/'H' options (I didn't bother eating chars
  313. in those routines.) So far I have found LOTS of PD and even some non-PD stuff
  314. that has the same problem. There has to be a better solution than the one I
  315. used.
  316.