home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / files / fileman / fm / fm.doc < prev    next >
Encoding:
Text File  |  1988-08-23  |  13.3 KB  |  287 lines

  1. FM.DOC
  2. Printed: 03-04-1988                                                  Page:    1
  3.  
  4. Program: FM (FileManager)
  5. Author:  Jim Zwick
  6.          51-C Cottage Street
  7.          New Hartford, CT 06057
  8. Version: 1.0
  9. Date:    03-04-88
  10.  
  11.  
  12. OVERVIEW
  13.  
  14. FM facilitates DOS file-handling procedures by providing a visual
  15. display of a directory's files and allowing files to be copied, moved,
  16. renamed, erased, printed and viewed by highlighting the files on the
  17. display and picking commands from a menu.  Files can be spooled for
  18. printing using the DOS 3.xx Print Spooler from within FM.  The program
  19. also displays the current spool and provides options to cancel printing
  20. of either selected files or the whole queue.  On-line help is available
  21. by pressing <F1> from either the main File Manager or Spool Control
  22. menus.
  23.  
  24.  
  25. GENERAL OPERATION
  26.  
  27. To start the program enter FM at the DOS prompt.  FM will store the
  28. start-up screen and display a full-screen list of the files in the
  29. current directory, the number of files, and the amount of free disk
  30. space.  The files will be displayed in alphabetical order with the
  31. first file in the list highlighted in reverse video.  The following
  32. command menu will be displayed near the bottom of the screen:
  33.  
  34.     mArk  Copy  Move  Erase  Rename  View  Print  Spec  Dir  dOs
  35.  
  36. To issue a command, type the capitalized letter in the desired command
  37. name.  The following is a full list of the commands available from this
  38. menu:
  39.  
  40.   mArk    - Mark current file to be copied, moved or erased.
  41.  
  42.   Copy    - Copy marked file(s) from current directory to another
  43.             directory or drive.
  44.  
  45.   Move    - Move marked file(s) from the current directory to another
  46.             directory.  Note that you cannot move files from one drive
  47.             to another -- you can only move them between directories on
  48.             the same disk.
  49.  
  50.   Erase   - Erase marked file(s) from the current directory.
  51.  
  52.   Rename  - Rename the currently highlighted file.
  53.  
  54.   View    - View the currently highlighted text file.
  55.  
  56.   Print   - Display DOS 3.xx print queue and access spool control
  57.             options.
  58.  
  59.   <Alt>-P - Submit the currently highlighted file to the print queue.
  60.  
  61. FM.DOC
  62. Printed: 03-04-1988                                                  Page:    2
  63.  
  64.   Spec    - Change the file specification used in the directory display
  65.             (this works like the DOS DIR command and wildcard
  66.             characters can be used).
  67.  
  68.   Dir     - Change directories.
  69.  
  70.   dOs     - Exit temporarily to DOS.
  71.  
  72.   <Esc>   - EXIT from program.
  73.  
  74.   <F1>    - Display a help screen listing these commands and
  75.             descriptions.
  76.  
  77. The arrow keys can be used to move around within the display and <PgUp>
  78. and <PgDn> can be used to move between screens when more than eighty
  79. files are in a directory.  The currently highlighted file will be
  80. displayed in reverse video, as will all marked files.  The current file
  81. will also have a blinking cursor under the first letter in its name so
  82. that it can be distinguished from marked files.
  83.  
  84. Using <PgUp> or <PgDn> to move between screens does not remove marks from
  85. files.  If you are in a directory with a lot of files, you can mark all
  86. that you want in the first 80 files, move to the next screen(s) using
  87. <PgDn>, mark still more files, and copy, move or erase them all at once.
  88.  
  89. The dOs command allows you to exit temporarily to DOS.  When you enter
  90. this command the message 'Type EXIT to return to File Manager ...' will
  91. be displayed on the screen and a new copy of DOS will be loaded into
  92. memory.  You can do almost anything you want, including changing
  93. directories and running other programs, before you return to FM.  You
  94. should keep in mind, however, that both FM and this second copy of DOS
  95. are stored in memory, substantially reducing the memory available for
  96. running other programs.  Be careful to return to FM and finally
  97. exit from it using <Esc>.
  98.  
  99. The print spooling commands are only available when you run the program
  100. under DOS 3.xx and have installed the print spooler before starting FM.
  101. If the commands are not available the Print option in the main menu line
  102. will not be highlighted (the capitalized letter will not be displayed in
  103. bold video) and nothing will happen if you press P or <Alt>-P.  When
  104. the spooler is available the following spool control options are
  105. available:
  106.  
  107. Pressing <Alt>-P sends the current file to the print spooler.  Note
  108. that the program does not check the file to see if it is a text file
  109. so it is a good idea to double-check the file extension of the file
  110. you are submitting to the spool.
  111.  
  112. Pressing P from the main FM menu will display the Spool Control window.
  113. It will list any files currently in the print spool and the following
  114. command menu will be displayed at the bottom of the screen:
  115.  
  116.     Print   Cancel File   Cancel All
  117.  
  118. In addition to these commands, pressing <F1> will display a brief help
  119. screen with descriptions of the commands and their use, and <Esc> will
  120. return you to the main FM window.
  121.  
  122. FM.DOC
  123. Printed: 03-04-1988                                                  Page:    3
  124.  
  125. The options in the Spool Control menu have the following functions:
  126.  
  127.   Print       - Allows you to enter the file name of a file to print.
  128.                 You can add a file you don't see on the queue or another
  129.                 copy of a file already on it.  This option will prompt
  130.                 you for a file specification of the file you want to
  131.                 print.  Because you can enter a full file specification,
  132.                 the file can be on any drive or in any directory.
  133.  
  134.   Cancel File - Allows you to selectively cancel printing of files that
  135.                 are on the queue.  You will be prompted to enter a file
  136.                 specification.  DOS wildcard characters can be included
  137.                 so you can cancel as few or as many files as you want.
  138.  
  139.   Cancel All  - Cancels all files from the queue.
  140.  
  141. If your printer is not on-line when you cancel files from the queue, the
  142. program may 'hang' temporarily before displaying the revised queue.  Try
  143. the same command from DOS when your printer is not on-line and you will
  144. get a similar response followed by an error message.
  145.  
  146. When entering information at the directory, destination and file spec
  147. prompts the following keys are available for editing:
  148.  
  149.   Left and Right Arrow - Move cursor one position without affecting text.
  150.  
  151.   <Ctrl>-Left and
  152.     <Ctrl>-Right       - Move cursor one word without affecting text.
  153.  
  154.   <Home>  <End>        - Move cursor to beginning or end of entry.
  155.  
  156.   <Back Space>         - Delete character left of cursor.
  157.  
  158.   <Del>                - Delete character at cursor.
  159.  
  160.   <Esc>                - Exit from editing if the cursor is at the first
  161.                          position in the field, otherwise delete all
  162.                          characters entered and move cursor to first
  163.                          position.
  164.  
  165.   <Crtl>-<End>         - Delete all characters from the cursor to the
  166.                          end of the field.
  167.  
  168.   <Ins>                - Toggle insert mode on and off.  When on the
  169.                          cursor will be about twice its normal size.
  170.  
  171.   <Num Lock>           - Toggle Num Lock on and off.  When on a #
  172.                          character will be highlighted in the bottom
  173.                          right corner of the screen.
  174.  
  175.   <Caps Lock>          - Toggle Caps Lock on and off.  When on a C will
  176.                          be highlighted in the bottom right corner of
  177.                          the screen.  This actually has no affect within
  178.                          this program because all input is forced to
  179.                          uppercase as it is entered.
  180.  
  181.  
  182.  
  183. FM.DOC
  184. Printed: 03-04-1988                                                  Page:    4
  185.  
  186. OPTIONAL MODIFICATIONS (Notes for Programmers)
  187.  
  188. Stack and Heap.  Both the stack and heap sizes must be set so that the
  189. program will not reserve all available memory for itself at start-up.
  190. There is a compromise in this setting between how much memory is
  191. available for file buffering during copying and viewing and the
  192. amount of memory available when you use the dOs command to exit
  193. temporarily to DOS.  The program has a very small data segment (less
  194. than 1k); the stack has been set at 8k (the program ran out of stack
  195. once when I had it set at 4k but I haven't tested the range in between).
  196. Most of the program's larger variables are stored on the heap and the
  197. program will use all available memory up to the maximum heap set using
  198. the $M compiler directive.  The only problem that increased heap creates
  199. is that every byte of increased heap is a byte of decreased memory
  200. capacity when using the EXEC (dOs) procedure to exit temporarily to DOS.
  201. Experiment with these settings to find the combination that works best
  202. for your day-to-day use of the program.  If you want to remove the dOs
  203. option and not restrict the heap, comment out the MemLimited compiler
  204. definition as explained in the source code comments.  This will
  205. eliminate the dOs option from the compiled program and the program will
  206. be compiled with whatever default stack and heap settings you have set.
  207.  
  208. Colors.  The background and foreground colors are set in the
  209. InitVideo procedure included in FMScreen.PAS.  I do not have
  210. a color display so I really do not know how the colors will appear.
  211. If they are not right, or you just have different color preferences,
  212. this is the procedure to modify.  CheckSnow is set to TRUE in the
  213. InitVideo procedure if a color adapter is in use.  This works well
  214. for the standard Turbo screen writing procedures but it is by-passed
  215. by both the window routines and the DisplayLine procedure.  If you
  216. know of a way of stopping snow, the procedures to add it to are
  217. DisplayLine, WOpen and WClose.
  218.  
  219. File Attributes.  The GetFAttr and SetFAttr procedures in Turbo Pascal
  220. 4.0 allow you to read and set a file's attributes.  This makes many
  221. file-handling procedures much easier than they were under version 3.0.
  222. In particular, you can now write programs that perform operations on
  223. read-only and hidden files by saving their attributes, performing the
  224. desired operation, and restoring the original attributes.  In this
  225. implementation of the program I have restricted the display to files
  226. which have their read-only and/or archive bits set.  All operations
  227. except erasing are allowed on read-only files.  To display hidden
  228. and/or system files, change the attribute used in the call to
  229. FindFirst in the GetFilesList procedure contained in FMFile.PAS from
  230. ReadOnly to ReadOnly + Hidden [+ SysFile].
  231.  
  232. From Program to Unit.  Most of this program was originally written for
  233. inclusion in a much larger application which required easy manipulation
  234. of the files it produced.  It became a separate program as I was
  235. converting the larger program to Turbo Pascal version 4.0, turning
  236. the old Include files into Units.  Since Turbo Pascal version 4.0
  237. allows conditional compilation FM could be made into a unit and a
  238. program at the same time!  This is probably not the primary use of
  239. conditional compilation but it is certainly useful when you include
  240. small utilities in your larger programs.
  241.  
  242. If you want to include the File Manager in your own applications all you
  243. have to do is delete the '(* *)' comments around the {$DEFINE FMasUNIT}
  244. FM.DOC
  245. Printed: 03-04-1988                                                  Page:    5
  246.  
  247. statement at the top of FM.PAS.  If you will not be setting a low maximum
  248. heap in your program you should also put comments around the
  249. {$DEFINE MemLimited} statement.  This will eliminate the dOs option (which
  250. requires that the maximum heap be set) from the unit.  That is all that has
  251. to be done.  {$IFDEF xxx} and {$IFNDEF xxx} statements in FM.PAS do the rest!
  252. All variables and procedure declarations will be hidden from your main
  253. program except the FileManager procedure declaration which is compiled in the
  254. Interface section of the unit.  The short sample program, FMUTest.PAS,
  255. provides an example of how to call the File Manager when used as a unit.
  256.  
  257.  
  258. FILES INCLUDED
  259.  
  260. FM.PAS        { Main Program File }
  261. FM.EXE        { Executable version of FM.PAS }
  262. FM.TPU        { Compiled Unit version of FM.PAS }
  263. FMScreen.PAS  { Screen and keyboard status routines }
  264. FMInput.PAS   { Input routines }
  265. FMFile.PAS    { File-handling routines }
  266. FMView.PAS    { View procedure }
  267. FMUTest.PAS   { Short sample program that USES FM Unit and calls FM through }
  268.               { the FileManager procedure declaration compiled into the }
  269.               { program when it is compiled as a unit.  You will have to }
  270.               { remove the comments from the {$DEFINE FMasUNIT} statement in }
  271.               { FM.PAS to re-compile this if FM.TPU is not available. }
  272. FMUTest.EXE   { Compiled version of FMUTest.PAS. }
  273. FM.DOC        { This file }
  274.  
  275.  
  276. SYSTEM REQUIREMENTS
  277.  
  278. In its current configuration (8k Stack, 64k Heap), the program should
  279. run with as little as 98k of available RAM.  More is needed to use the
  280. dOs option.  Either monochrome or color monitors are acceptable.
  281. Turbo Pascal version 4.0 is required to re-compile the program.  Because
  282. many low level machine-specific routines are used in the program, an
  283. IBM PC/XT/AT or close compatible running MS- or PC-DOS version 2.0 or above
  284. is required.  A DOS version of 3.0 or greater is required to use the print
  285. spooling functions.
  286. 
  287.