home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #2 / RBBS_vol1_no2.iso / add2 / dc105c.zip / DC.DOC < prev   
Text File  |  1989-04-15  |  15KB  |  323 lines

  1.                  DC - Directory Control
  2.                       Version 1.05
  3.                    by Peter Esherick
  4.  
  5.            Contact via: Albuquerque PC Users' Group or
  6.            Albuquerque RBBS  296-7672, John Maio, sysop
  7.            Surya             294-9601, Paramjeet Singh, sysop
  8.            ARPANET/MILNET    <esheric@sandia.gov>
  9.  
  10.  
  11. Command DC
  12. ----------
  13.  
  14. Purpose:  To allow selective copying, moving, deleting and browsing
  15.           of files displayed in a directory listing.
  16.  
  17. Format:   DC [d:][source-path] [d:][dest-path] [/O,N,E,D,or S][/F][/V]
  18.  
  19. Remarks:  
  20.    This program is closely based on the CO and DR programs, both written 
  21. by Michael J. Mefford and published in PC Magazine, vol.6, #17 and #21, 
  22. 1987.  I have combined features from these two programs and also added a 
  23. number of new features of my own.  This program is released into the 
  24. public domain, as is, with no warranties of any kind. I will be happy to 
  25. supply source code to any interested party, with the request that if you 
  26. make any significant changes, modifications, or improvements that you 
  27. please share these changes, preferably in source code form, with me and 
  28. the rest of the PC user community. 
  29.  
  30. Usage notes:
  31.    The source and destination directory pathnames are both optional. 
  32. Options, specified by a "/" followed by a letter, may appear either before 
  33. or after the pathnames.  The options are as follows: 
  34.  
  35. /N      Sort directory by filename
  36. /E      Sort directory by extension
  37. /D      Sort directory by date and time
  38. /S      Sort directory by file size
  39. /O      Use original order, i.e. do not sort directory at all. 
  40. /V      Turn on DOS Verify switch for disk file writes
  41. /F      Fast display on IBM Color display adapters (no snow check)
  42.  
  43.    DC comes up displaying the "source" or "working" directory.  A brief 
  44. menu of optional commands is displayed to the right of the directory 
  45. dispaly.  You may move up and down the directory list with the up and down 
  46. arrow keys on the cursor keypad.  Files may be individually copied, 
  47. deleted, moved or renamed by pressing the function keys F1 through F4, 
  48. respectively.  Alternatively, a number of files may be selected, or 
  49. "marked" using the grey + and - keys on the right side of the keypad.  
  50. After marking, pressing the appropriated function key will apply the 
  51. chosen operation to the entire group of files. 
  52.  
  53.    Different directories can be displayed in two ways.  One is to press 
  54. the F9 function key and enter a new drive and path name.  Alternatively, 
  55. if you want to move to different sub-directories on the same drive, you 
  56. can simply press the "Enter" key after using the up or down arrow keys to 
  57. high-light the desired subdirectory.  Note that as always within DOS, ".." 
  58. denotes the parent of a given subdirectory, i.e. the level above the 
  59. currently displayed directory. 
  60.  
  61.    Just as pressing Enter lets you view a new directory, pressing Enter 
  62. when a filename is highlighted lets you view the contents of the file.  In 
  63. the default mode the display is wrapped at the edge of the screen if a 
  64. line is more than 80 characters wide.  This option can be toggled by 
  65. pressing W.  Display of non-ascii characters can be toggled with the Ascii 
  66. and Blank options by pressing A or B.  In Ascii mode only strings of 5 or 
  67. more normal ascii characters (including tab or space) are displayed.  This 
  68. is useful for viewing the messages conatained in an .EXE or .COM file.  
  69. With the Blank option, non-ascii characters are replaced with a blank or 
  70. space.  A final option, "*", masks the high-order bit of non-ascii 
  71. characters to make wordstar files readable.
  72.  
  73.  
  74. Key by key summary of commands:
  75.  
  76.    Esc     Exit program and return to original directory.
  77.  
  78.   Alt-Q    Exit program leaving the currently displayed dir as the 
  79.            current default drive and directory for DOS.
  80.  
  81.   Grey +   Mark current file entry, if not a subdirectory or hidden 
  82.   or Ins   file, and advance cursor to next line.
  83.  
  84.   Grey -   Remove mark on current file, and advance cursor to next line.
  85.   or Del
  86.  
  87. The following functions operate on the marked files, if any, otherwise
  88. they operate on the currently highlighted file, provided it is not a 
  89. sub-directory entry.  If the operation is successful the mark is 
  90. replaced with an asterix (*), if unsuccessful the file is passed over, 
  91. leaving the mark, and the program proceeds on to the next marked file.
  92.  
  93.     F1      Copy file(s) via a read/write sequence to requested target
  94.  
  95.     F2      Delete file(s) after asking for confirmation.
  96.  
  97.     F3      Move file(s), ie Copy to requested target, delete source.
  98.             Where possible this function is performed using an across 
  99.             directory rename instead of a file read/write sequence.
  100.  
  101.     F4      Rename file(s) or <dir> within the currently displayed directory.
  102.  
  103.     F5      Clear all marks
  104.  
  105.     F6      Mark all remaining files, ie those not marked with an "*".
  106.  
  107.     F7      Swap marked and unmarked files.
  108.  
  109.    The following three functions change the active source and dest 
  110.    directories:
  111.  
  112.     F8      Swap the Working Directory (source) and the Default 
  113.             Destination Directory 
  114.  
  115.     F9      Prompt for a new Working (source) Directory
  116.  
  117.     F10     Prompt for a new Default Destination Directory
  118.  
  119. The directory can be re-sorted by typing:
  120.  
  121.  Alt-N       Sort by filename
  122.  Alt-E       Sort by file extension (eg .COM vs .DOC)
  123.  Alt-D       Sort by date and time
  124.  Alt-S       Sort by file size
  125.  Alt-O       Re-read and display dir in original, unsorted order
  126.  
  127.  Additional commands not appearing in the menu: 
  128.  
  129.  Alt F1      Protected copy - bypass filenamess that already exist on target
  130.  
  131.  Alt F2      DOS Shell: Exit temporarily to DOS.  You can then run whatever
  132.              programs you need to run, and then return to the DC program by
  133.              typing "exit" at the DOS prompt.
  134.  
  135.  Alt R       Re-read working directory.  Required after changing diskettes 
  136.              in a floppy-disk drive. 
  137.  
  138.  Alt C       Copy (Duplicates F1)
  139.  Alt M       Move (Duplicates F3)
  140.  Alt V       View (Duplicates Return)
  141.  
  142.  View Mode commands:
  143.  
  144.  Alt W       Toggle word wrap/horizontal scroll
  145.  Alt A       Toggle Ascii string display
  146.  Alt B       Toggle blanking of non-Ascii characters
  147.    *         Toggle wordstar bit mask (shift non-ascii high-order 
  148.              characters (from 128 to 255) down into the displayable 
  149.              ascii range of 1 to 127. 
  150.  
  151.  
  152. Customizing DC.COM
  153.  
  154. Version 1.05 of DC can be customized to display the menu and dir text
  155. in the colors of your choice.  Rather than building into DC.COM an 
  156. automatic color setting function, I have fallen back on the hacker's 
  157. choice of letting you patch DC.COM with debug.  If this scares you, 
  158. learn how to use debug, ask a friend, or learn to love the ridiculous 
  159. choice of colors that is built in to this version.  I use a monochrome 
  160. screen, so it just hasn't been a big thing to me before.
  161.  
  162. Besides understanding DEGUG you need to know two other things: how the 
  163. PC video display cards translates hex numbers into colors, and what 
  164. locations to patch (change) in DC.COM.  The table below lists the 
  165. correspondance between hex numbers and foreground and background colors 
  166. on the PC.  To get the correct number for a combined foreground color 
  167. plus background number, you add the hex digits for the two.  For 
  168. example, brown on a blue background is given by 16h, where as brown on a 
  169. green background is given by 26h.  Note that in a hexidecimal 
  170. representation, which is what debug uses, the first digit is the 
  171. background color, while the second (least significant) digit gives the 
  172. foreground color.
  173.  
  174. Foreground (normal)  Foreground (intense)         Background
  175. --------------------------------------------------------------
  176.  0  black              8   dark gray               0   black  
  177.  1  blue               9   light blue             10h  blue   
  178.  2  green             0Ah  light green            20h  green  
  179.  3  cyan              0Bh  light cyan             30h  cyan   
  180.  4  red               0Ch  light red              40h  red    
  181.  5  magenta           0Dh  light mag.             50h  magenta
  182.  6  brown             0Eh  yellow                 60h  brown  
  183.  7  gray              0Fh  intense white          70h  gray   
  184.  
  185. OK, now you now how to define a color.  If you are a veteran hacker, 
  186. than the next table tells you all you need to know.  If your not, 
  187. hold on, we'll get you there.  
  188.  
  189. Location  Name       Default      Where used
  190. ------------------------------------------------------
  191. 103h      NORMAL       02         Directory display
  192. 104h      INTENSE      0Bh        Pathname display
  193. 105h      MENU         16H        Menu display
  194. 106h      BORDER       1EH        Menu border
  195. 107h      INVERSE      74H        Highlighted dir entry
  196.  
  197. Now, to use DEBUG to change the default colors, first 
  198. (1) Find DEBUG.COM from your DOS disk if you haven't already got it
  199. (2) Use COPY to make a copy of DC.COM on a working disk so you don't 
  200. mess up your one and only copy.
  201. (3) Assuming DEBUG is in the default directory or accessible via the
  202. path command, and that DC.COM is present in the default directory of the 
  203. currently logged disk, type the following (at the DOS prompt):
  204.  
  205. DEBUG DC.COM  (Debug will respond with a hyphen -)
  206. d103l5        (Debug will display the current values of the colors)
  207. e103          (Debug will display the first color, followed by a '.',
  208.               for example 02.  At this point type in the one or two 
  209.               digit number that you want to use for the NORMAL color.  
  210.               If you don't want to change it, press the space bar.  
  211.               After entering the number or a space, debug will go on to 
  212.               the next color, and you repeat the last step until you 
  213.               have entered something for all five colors.  If you want 
  214.               to quit and go back, press the Enter (return) key, and re-
  215.               enter the e103 command at the '-' prompt.  When your done 
  216.               here you only two more steps to go:
  217.               
  218. W             (This command writes the modified file back on to the disk.
  219.               (Debug responds with "Writing 17F3 bytes", or something close)
  220.  
  221. Q             (And the Q command quits DEBUG and returns you to DOS.
  222.  
  223. Other Patch Locations:
  224.  
  225. Switch character (108h):  '/' or '-'
  226.  
  227. For the UNIX hackers, there's one more byte that you can change at your 
  228. pleasure, and that is one I have labeled SWITCH at location 108h in the 
  229. DC.COM file.  The character/byte at location 108h is used to identify an 
  230. option entered on the DOS command line when you first call up DC. 
  231. Normally this is '/', so that options would be specified by /d or /o. By 
  232. changing the byte at location 108 to '-', options can be entered as -d 
  233. or -o.  This lets you use '/' in your path names, so that instead of 
  234. entering command lines like: 
  235.  
  236. DC  C:\COMM\DOWN D:\UTIL /D  
  237.  
  238. You can now enter:
  239.  
  240. DC  C:/COMM/DOWN  D:/UTIL -D    or
  241. DC  C:\COMM\DOWN -d  D:\UTIL    or
  242. DC  -d  C:/COMM\DOWN  D:/UTIL -D 
  243. But not:  DC C:\COMM\DOWN  D:/UTIL /D    (This will clearly confuse DC)
  244.  
  245. (Note that since the problem is with the option switch, and since there 
  246. are no options entered with pathnames once the programming is running, 
  247. you can use either / or \ as a path delimiter when entering a 
  248. destination or changing the path with F9 or F10 keys.)
  249.  
  250.  
  251. Snow Checking (109H):    0h enables, 0FFh disables
  252.  
  253. When DC starts up it checks BIOS data area (Segment 40) to see if the 
  254. current display adapter is a monochrome or color card.  If it isn't mono,
  255. then DC will query the display adapter, before writing a character to the
  256. display memory, to see if it is ok to do so.  This procedure is necessary
  257. to avoid spurious dots or "snow" on old IBM Color Graphics Adapters (CGA's). 
  258. Unfortunately, this also slows things down quite a bit.  If you prefer speed
  259. over a clean display update, or if you have an EGA or other color display
  260. adapter that doesn't need to do this checking, then put 00h in the byte
  261. at 109h.  A zero at this location will enable snow checking on all but
  262. the monochrome display adapter (which never needs it anyway).  If you
  263. want to temporarily try out what this patch does, use the /F option 
  264. switch when you start up DC.
  265.  
  266. Acknowledgments:
  267.    My thanks to Steve Grandi of U. Arizona for adding the DOS shell
  268. function to DC.  Steve has also implemented a UNIX style -switch version
  269. uses "/" instead of "\" as the path delimiter.
  270.  
  271. Revision history:
  272.  
  273. DC version 1.05(c) - April 15, 1989
  274.         Fixed memory allocation bug when less than 64k to grab 
  275.         Changed logic of snow check patch at 109h
  276.         Sensing the EGA and disengaging snow control if one is present,
  277.         Alt F2 for DOS Shell
  278.  
  279. DC version 1.04(f) - June 8, 1988
  280.         Add Ins/Del as duplicates to Grey +/- keys
  281.         Fix Backspace bug that occurred on original PC's
  282.         Work on display speed/ cursor overrun problem
  283.         Minor(?) change in memory management
  284.         Last ditch- moved data to end of file to save space
  285.  
  286. DC version 1.03  - April 6, 1988
  287.         Add customizable colors and switch-char
  288.         Add Rename for directories
  289.         Automatically re-read dir with Alt-O original order sort
  290.         More work on error recovery - write protected target
  291.  
  292. DC version 1.02 - March 14, 1988
  293.         Added Alt-F1 "Protected Copy" function.
  294.         Tweaked file view function to save 4 bytes.
  295.         Now highlights last sub-dir viewed when returning to parent dir
  296.  
  297. DC version 1.01 - March 7, 1988
  298.         Modified method of handling directory changes
  299.         F9 (change work dir) now relative to displayed work dir
  300.         Allow specifying both source and dest paths on entry
  301.  
  302. Earlier versions COD1 through COD9: Dec '87 to Mar. '88
  303.         Combined DR and CO, 
  304.         Added ability to change directories
  305.         Added more screen info on bytes free
  306.         Added "spedometer" display of marked files, bytes
  307.         Added "View" options to 
  308.                 toggle word wrap, 
  309.                 Horizontal scroll
  310.                 blanking or full suppression of non-ASCII
  311.  
  312.  
  313. Features that could be added:
  314.  
  315.   Sub-directory functions like RMDIR and MKDIR on directories
  316.   Improved error messages on disk not ready, etc
  317.  
  318.   List options:   hex dump a la Buerg's LIST.COM
  319.                   search/scan for text
  320.                   display current horizontal scroll position
  321.                   improve provisions for re-synch in mode toggles
  322. 
  323.