home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / fileutil / cf.arj / CF.DOC next >
Encoding:
Text File  |  1991-02-18  |  66.6 KB  |  1,226 lines

  1.  
  2. CF VERSION 0.9X
  3.  
  4.                   CF - A PROGRAM FOR COMPARING DIRECTORIES
  5.                   ========================================
  6.  
  7.  
  8.  
  9. NOTES
  10. -----
  11.  
  12. (a)  The  key assignments have been substantially altered in this version  - 
  13.      see the short help file (CF.HLP) for the latest list.
  14.  
  15. (b)  The  version history is now in a file called CF-HIST.DOC and the  order 
  16.      of the entries has been reversed.
  17.  
  18. (c)  I'd  like  some feed-back.  If you use CF, then  tell  me!   Otherwise, 
  19.      development of it will stagnate and no bugs will be fixed.  (Mind  you, 
  20.      if  you  DO drop me a line / fax / call / poke-in-the-eye,  brevity  is 
  21.      appreciated.)
  22.  
  23. (d)  See  the disclaimer at the end.  (Warantee?  What warantee?   HOW  much 
  24.      did  you  pay for this?  Unless you've been ripped off, the  answer  is 
  25.      "sod all"...)
  26.  
  27.  
  28.  
  29. INTRODUCTION 
  30. ------------
  31.  
  32. CF  is a program that will compare the date, time and file sizes of a  number 
  33. of  files in different directories (or "file sets") and highlight the  latest 
  34. (and,  possibly,  the  earliest) file.  It can  do  this  comparison  between 
  35. different machines that are NOT net-worked.
  36.  
  37. Towards  the start of 1990 I purchased (not "invested in"; why  do  otherwise 
  38. normal  people, when buying a computer to play with, have to "invest in"  it, 
  39. rather than BUY it?) an NEC PowerMate SX.  One of the programs that I  wanted 
  40. to  write  was  a directory comparing program.   Luckily,  before  I  started 
  41. development,  I  came  across the free  PC-Magazine  utility,  DirMatch.   It 
  42. quickly became apparent that it didn't do everything that I wanted - although 
  43. DirMatch  compares directories perfectly well, my requirement was to be  able 
  44. to compare directories on DIFFERENT machines - in a development  environment, 
  45. it  is common to have many people, using different machines, working  on  the 
  46. same  system.  Clearly, it is desirable that they work with the SAME  set  of 
  47. program  sources.  As system integrator and generator of release versions  of 
  48. our  software, it was imperative that I use only the LATEST versions of  each 
  49. module.  Hence, I wrote this program, "CF".
  50.  
  51. So,  how  can I easily compare program sources on  different  machines?   The 
  52. obvious  answer  is  too copy a complete set of the  sources  on  the  second 
  53. machine  and  use DirMatch.  But, our system comprises well over  five  mega-
  54. bytes  of source in nearly 300 modules.  So, what can we do?  Well,  most  PC 
  55. uses  have  come  across the MS-DOS command, "DIR".   So  what's  wrong  with 
  56. redirecting  the output from DIR to a file, and compare a like file  from  MY 
  57. machine?
  58.  
  59. The  hard part (find out which files are different, and which is  the  latest 
  60. version), is left to CF.  It quickly became apparent that it would be nice if 
  61. programs, other than DIR, could be used for the directory compare.  So, since 
  62. the process of recognising the different formats was a simple matter, I  laid 
  63. my hands on as many programs that I could, that produce DIR-like output,  and 
  64. put in code to recognise them.  The current list is as follows:
  65.  
  66.  
  67.  
  68. SUPPORTED SOURCES
  69. -----------------
  70.  
  71. Program        Version                  Author/Publisher
  72.  
  73. Directories    MS-DOS 3.3               Microsoft
  74. DIR            MS-DOS 3.3 and 3.2       Microsoft
  75. DIR            OS/2 1.0, 1.1 and 1.2    Microsoft
  76. DIR            4DOS 3.0 and 3.02        J. P. Software
  77. DIR            DR DOS 5.0               Digital Research
  78. ARC            5.12 and 5.20            System Enhancement
  79. PKARC          3.6                      PKWare
  80. PKPAK          3.61                     PKWare
  81. PKZIP          1.01, 1.02 and 1.10      PKWare
  82. PKZFIND        1.00                     PKWare
  83. XTREE          2                        Executive Systems
  84. XTPRO          1.0 and 1.1              Executive Systems
  85. XTGOLD         1.3 and 1.44             XTree Company
  86. SWEEP          1.0                      Strange Software
  87. FV             1.16, 1.28 and 1.32      Vernon Buerg
  88. FF             4.5                      Peter Norton
  89. FI             4.5                      Peter Norton
  90. HDIR           2.1                      Overfield/Woeger
  91. MAGELLAN       2.0                      Lotus Development Corp
  92. FASTBACK       1.01 and 2.10            Fifth Generation Systems
  93. NBACKUP        1.1                      Peter Norton
  94. DSBACKUP       2.4f                     Design Software
  95. PCTOOLS        6                        Central Point Software
  96. LHARC          1.13c                    Haruyasu Yoshizaki
  97. XDIR           1.41 (DR DOS 5.0)        Digital Research
  98. CF             Current                  Yours truly...
  99.  
  100. Notes:    (a)  CF  will  identify PKARC listings as "PKPAK"  since  the  file 
  101.                layout is the same.
  102.  
  103.           (b)  Likewise, CF will identify MS-DOS 3.2 DIR output as "4DOS".  I 
  104.                implemented  4DOS recognition before obtaining an  MS-DOS  3.2 
  105.                DIR listing.  I assume that the 4DOS DIR command emulates  MS-
  106.                DOS  3.2 output because it was written before MS-DOS  3.3  was 
  107.                available.
  108.  
  109.           (c)  CF  only accepts the single or double column layout from  HDIR 
  110.                and the 4DOS version of DIR.
  111.  
  112.           (d)  With  ARC,  only  the "V" option is supported  since  the  "L" 
  113.                option listing does not include the time.  Also, ARC does  not 
  114.                give  file  locations.  If ARC output is appended  to  another 
  115.                program's output, the location of the ARC files will be wrong.  
  116.                If  the ARC output is in a separate file, however, it will  be 
  117.                correct (that is, missing), since the location is set back  to 
  118.                a "?" each time a text file is opened.
  119.  
  120.           (e)  See the note later on using CF output as input.
  121.  
  122.           (f)  CF  will only accept output from MAGELLAN if the options  have 
  123.                been set to use a date format where the YEAR comes FIRST.   CF 
  124.                can cope with both time formats. 
  125.  
  126.           (g)  PKZFIND  is a bit of a strange beast.  Like MAGELLAN, just  to 
  127.                make  things  as awkward as possible, it has  variable  column 
  128.                layout.   However,  with MAGELLAN, I KNOW that the  output  is 
  129.                from  MAGELLAN because part of each file path is in  the  same 
  130.                column.   Unfortunately, with PKZFIND, I cannot do this  since 
  131.                it sometimes leaves the leading drive letter out.
  132.  
  133.                Thus,  the PKZFIND recognition is not as good as that for  the 
  134.                other programs.  Since I cannot RELIABLY detect PKZFIND "funny 
  135.                layout"  output,  I have decided to ignore any  PKZFIND  lines 
  136.                that  do NOT have the date, time and size information  in  the 
  137.                "default"  columns.   In other words, CF will  ignore  PKZFIND 
  138.                output if the file path names are too long.  (CF will give  NO 
  139.                warning if this happens.)
  140.  
  141.                For  the  same  reason, I cannot detect the  path  strings  if 
  142.                PKZFIND  is used in the "ZIP only" (-Z) mode.  The paths  come 
  143.                out as a "?".
  144.  
  145.                Finally, in the (default) mode of "all files" (that is, not -Z 
  146.                and not -N), CF will include the size of any .ZIP files, along 
  147.                with  the sizes of all files contained therein.  For  example, 
  148.                if  you  PKZFIND a .ZIP file of 100k, that  contains  300k  of 
  149.                files, CF will report a total file size of 400k - it adds  ALL 
  150.                of the sizes together.
  151.  
  152.                I  can only recommend that if you have any OTHER program  that 
  153.                you  can use, to produce input for CF, then USE  it.   PKZFIND 
  154.                produces  singularly  un-helpful  output,  as  far  as  CF  is 
  155.                concerned.  Sorry, but it's the best I can do.  (I suppose you 
  156.                could blame PKWare for this.  Mind you, they more than redress 
  157.                the balance by giving the world .ZIP files, don't they?)
  158.  
  159.           (h)  Do  not  take  a  program's  appearance  in  this  list  as  a 
  160.                recommendation  for use - it might be in this list,  but  this 
  161.                DOESN'T  mean I either use it or recommend it.   For  example, 
  162.                there is no way I'd use ARC in preference to PKPAK or PKZIP  - 
  163.                ARC  is there merely because somebody, somewhere may STILL  be 
  164.                using it.  (Yes, it DOES seem unlikely, doesn't it?)
  165.  
  166.  
  167.  
  168. CONCEPTS
  169. --------
  170.  
  171. The  parameters may be in any order.  They are case insensitive, and come  in 
  172. three  flavours: file "sources", local parameters and global parameters.   At 
  173. start  up,  all  of the parameters are processed, and  all  global  parameter 
  174. actions  are  performed.  Therefore, global parameters do NOT  have  to  come 
  175. before the other types.  Global parameters are preceded by a minus sign or  a 
  176. slash  (what a surprise).  They may NOT be strung together - each  must  have 
  177. it's own minus or slash.
  178.  
  179. Local  parameters  only apply to the following file name or  directory  name.  
  180. For  example,  with  the  -D option  (descend  directories),  only  the  next 
  181. directory  name  will  be  recursed - thereafter,  directories  will  NOT  be 
  182. recursed unless they, too, have a -D before them.
  183.  
  184. Finally, all other parameters are considered to be either the names of MS-DOS 
  185. directories,  or  text file output from other programs, or  re-directions  of 
  186. same.
  187.  
  188. In  fact,  there  are  two parameters that fall  half-way  between  a  global 
  189. parameter  and  a  local  parameter.  These are  the  file  name  "filtering" 
  190. parameter, -F, and the parameter redirection facility.  The -F applies to ALL 
  191. of the following file sources, but any further -Fs will override all  earlier 
  192. ones.  More on this parameter later.
  193.  
  194. The second exception is parameter redirection.  This allows you to specify  a 
  195. file  that  will be scanned and have the contents placed into  the  parameter 
  196. list.  These may be nested to a depth dependant upon the number of files that 
  197. MS-DOS  will allow you to open and the amount of free memory you  have.   The 
  198. syntax is simple; if you want to load parameters from FRED.TXT, use something 
  199. like "CF @FRED.TXT C:".  You may put an entry like this into your .INI  file.  
  200. (See  see  the  CONFIGURATION section for details of  the  .INI  file.)   For 
  201. example, if you'd put "PARAMETER @FRED.TXT" into your .INI file, the previous 
  202. command  line  could  read  "CF  C:".  The  .INI  will  be  scanned  and  the 
  203. redirection  automatically applied.  If the redirection file cannot be  found 
  204. where  it  was specified and it is a bare file name WITHOUT a path,  CF  will 
  205. search in the start-up directory.
  206.  
  207. In the following discussion, I use the term "file set", to mean a  collection 
  208. of  file details that will be compared.  Thus, if you want to  compare,  say, 
  209. the  files  in your current directory, with those of  the  parent  directory, 
  210. there  will  be two file sets.  One will be the set of files "*.*",  and  the 
  211. other will be the set of files "..\*.*".
  212.  
  213. An example, if you want to do the above comparison, you could use:
  214.  
  215. (1)       CF . ..
  216.  
  217. Simple enough, eh?  (But see the BUGS section for details of a CF problem  in 
  218. this area.)  Of course, this example would be better off done using  DirMatch 
  219. -  it's a smaller program, it uses less space, and it runs faster.   However, 
  220. what if you want to compare all of the files in your local directory with the 
  221. same  files on another machine?  The answer is, you could use CF.   First,  a 
  222. DIR  would  have to be done on the other machine, and redirected to  a  file, 
  223. X.CF, say.  Then, transfer it to your machine on a floppy and use CF:
  224.  
  225. (2)       CF . A:X
  226.  
  227. (Note that, from now on, I have assumed that CF will automatically  recognise 
  228. that  you want "X.CF", say, when only "X" is specified.  To find out  how  to 
  229. make  CF  do  this, see the CONFIGURATION section.)   This  would  produce  a 
  230. display showing the file names and two columns (that is, file sets) of  dates 
  231. and times.  The latest of each file will be highlighted in red.  If the files 
  232. have  the same date and time, then NEITHER will be highlighted.   (Note  that 
  233. this is opposite to the action that DirMatch takes - DirMatch would highlight 
  234. BOTH files.)
  235.  
  236. If  you  want to have CF combine the output of several different  text  files 
  237. into  ONE  file  set, use the local parameter, "+",  between  them.   (Spaces 
  238. either  side, please.)  For example, if, in the above example, the  directory 
  239. listing  on the second machine was redirected into two separate  files,  X.CF 
  240. and Y.CF, the command line would have to be:
  241.  
  242. (3)       CF . A:X + A:Y
  243.  
  244. Any combination of file names and directory names can be used.  For instance, 
  245. this is a legal CF command line:
  246.  
  247. (4)       CF X + Y + Z A + B + C . + ..
  248.  
  249. This would compare the file sets comprising the files in X.CF, Y.CF and Z.CF, 
  250. the  files in A.CF, B.CF and C.CF and the files in the default directory  and 
  251. it's parent.
  252.  
  253. CF  deduces  the source program that produced the listing on  a  line-by-line 
  254. basis.   Thus,  in  example  (3),  above,  the  two  files  could  have  been 
  255. concatenated  on  the second machine BEFORE transfer to a  floppy  disk.   In 
  256. fact,  the output in a single text file can come from any combination of  the 
  257. programs  mentioned  above.   Thus, a DIR listing could be  appended  to  the 
  258. output from PKZIP and then submitted to CF.
  259.  
  260. NOTE:
  261.      Since  I wrote the last paragraph, I've found that the layout  of  PKZIP 
  262.      has  changed between versions 1.02 and 1.10.  (The order of the day  and 
  263.      month fields has been swapped.)  The difference is *NOT* detectable on a 
  264.      line-by-line basis.  To cure it, I added code to detect the PKZIP  sign-
  265.      on message, and this saves the version number for later use.  Therefore, 
  266.      if you are submitting  PKZIP input to CF, make sure that it is  preceded 
  267.      by the sign-on waffle.  If no sign-on is detected, CF will use the  last 
  268.      PKZIP  version  it  came across.  At system  start-up,  it  defaults  to 
  269.      "1.10".
  270.  
  271. Besides the date and times of the files in each file set, CF lists file  name 
  272. (that helps...), and the file "number".  This number is just a record  number 
  273. for  your reference - when displaying selections of the files in   your  file 
  274. sets, they may not be consecutive and, indeed, large gaps may exist.
  275.  
  276. At  any time, one file in one file set is highlighted with a large  "cursor".  
  277. This cursor can be moved to a different file name using the up and down arrow 
  278. keys,  or to the same file in a different file set using the left  and  right 
  279. arrow  keys.  You will see, as the cursor highlights a different file,  that, 
  280. near the bottom of the screen, the size of the file, it's date and time,  and 
  281. it's  "location"  will  be displayed.  (More on the  "location"  of  a  file, 
  282. later.)   After  the  date and time of the file, you may  see  another  entry 
  283. enclosed in parentheses.
  284.  
  285. This  is  the  size  and time difference between the  current  file  and  the 
  286. "latest"  one  found.   If there IS no entry, the size  and  time  match  the 
  287. latest.  By the way, if you are viewing the duplicate entries, the difference 
  288. is  between the latest duplicate (that is, the one you would normally see  on 
  289. the screen) and the currently viewed duplicate.  Try it out - I think  you'll 
  290. get the idea.  If the file only differs in size, there will just be a  number 
  291. enclosed in parentheses.  If the size difference is positive, this  indicates 
  292. that  the  file is LARGER than the "reference" file and vice versa.   If  the 
  293. time  also  differs,  the  size  difference will  be  followed  by  the  time 
  294. difference in (possibly) days, hours and minutes.  As well as the  difference 
  295. fields,  in  the  extreme  bottom  right-hand corner  of  the  screen  is  an 
  296. indication of WHICH duplicate you are viewing.  The second number (after  the 
  297. slash)  is  just  the total number of duplicates for this  file.   The  first 
  298. number indicates which is on view - a value of one indicates that this is the 
  299. latest  of  the duplicate set.  (That is, the field will hold the  value  one 
  300. when the normally displayed record is selected.)
  301.  
  302. The  cursor can be moved through the file list using the keys you'd expect  - 
  303. home, end, ctrl-home, ctrl-end, page-up and page-down.  It also wraps around, 
  304. both vertically and horizontally.
  305.  
  306. At the top of the screen, you will see the version number of CF, and the list 
  307. of  files that were the source of each file set.  In example (4),  you  would 
  308. see  the strings "X.CF+Y.CF+Z.CF", "A.CF+B.CF+C.CF" and ".+..".  (During  the 
  309. loading  phase CF displays a count, of free DOS and EMS memory, in this  area 
  310. of  the screen.)  They will be truncated if the date and time field width  is 
  311. too small to hold the complete string.
  312.  
  313. For each file record, the file sizes either will, or will not, be  displayed, 
  314. the date will be in either long or short format and the cursor will be either 
  315. locked  or  free.   The  default date size and whether  the  file  sizes  are 
  316. included,  or not, depend on the number of file sets loaded - the more  sets, 
  317. the  less  information that can be displayed about each file.   They  can  be 
  318. changed, however, but CF does NOT check for line overflow - "caveat user", as 
  319. it were.
  320.  
  321. If  the  cursor is locked, then this means that it will NOT be  permitted  to 
  322. highlight  a none-existent file.  In other words, if one file name  does  not 
  323. appear  in one of the file sets, the cursor will skip to either the  left  or 
  324. right.
  325.  
  326. Under  the CF version number text, you will find the current  the  "selection 
  327. mode" displayed.  CF only displays the files that qualify, depending on  this 
  328. mode  - if no files qualify in a particular mode, then that mode will not  be 
  329. represented  in  the  list.  The default, unless over-ridden  with  a  global 
  330. parameter, is "All".  In other words, all loaded files are displayed.  "Same" 
  331. means  that  only files that exist, and are the same date and time,  for  all 
  332. file sets, will be displayed.  "Different" files are those that are, for some 
  333. reason, different - either it does not exist in one or more file sets, or the 
  334. sets  disagree  about the date and time, and so on.  When CF is  loading  the 
  335. file details, it may find that it already has details of a file with the same 
  336. name.  In this case, it makes a decision, based on the date, time and size of 
  337. the  files, and picks the latest (or largest) file.  This file would then  be 
  338. considered  to have been a duplicate, and the mode "Dup" displays only  those 
  339. records  where one of the file sets has a duplicate file in it.  Select  mode 
  340. "Only"  is  for files that exist in at most ONE file set and  "Name"  is  the 
  341. opposite  of  "Only"  - it selects the files that appear  in  at  least  two.  
  342. Finally, the last three select all files that have a "low-lighted" file,  all 
  343. files  that have a high-lighted file and all files in a particular file  set, 
  344. respectively.   (DirMatch  has an equivalent for only three of CF's  modes  - 
  345. "Same", "Different" and "Name".)
  346.  
  347. High-lighted files are those with the latest date and time - if more than one 
  348. file  has the latest date and time, then more than one will be  high-lighted.  
  349. (CF  uses the date, time AND file size to determine the "latest"  file.   The 
  350. size  is  ONLY used if the date and time are the same.  The  larger  file  is 
  351. considered  the  latest.)   Note that the seconds field is not  used  -  many 
  352. programs do not list the seconds in their output.  Low-lighted files have the 
  353. earliest date and time.  Note that low-lighted files are only displayed if at 
  354. least  three different date and times are represented - otherwise, with  only 
  355. two file sets loaded, EVERY file would be high-lighted or low-lighted.
  356.  
  357. In  order  to use the "all in this file set" mode, you must FIRST  place  the 
  358. large cursor on a file in the set you require (it does NOT have to be over an 
  359. existing  file  - that is, it can be over a blank space).  THEN use  the  tab 
  360. key,  or  whatever, to get into "this set" mode.  CF will then  only  display 
  361. records  that  have at least one file in the selected file set.   Also,  note 
  362. that the selected file set has it's source string high-lighted at the top  of 
  363. the display.
  364.  
  365. Right, earlier I mentioned "locations".  This is NOT the same as the "source" 
  366. of  the file set.  In example (1), the sources are "."  and  "A:X.CF+A:Y.CF".  
  367. However,  the  LOCATION is the directory in which the file  resides  on  it's 
  368. "home"  machine.   For example in (1), I assumed that the  files  existed  in 
  369. directories of the same name, but on DIFFERENT machines.  Hence, the  SOURCES 
  370. are different (one comes from the floppy text file, the other from the MS-DOS 
  371. directory), but the LOCATIONS are the same.  (Instead of trying to explain it 
  372. - try playing with CF.  I'm sure you'll get the idea.)
  373.  
  374.  
  375.  
  376. PARAMETERS
  377. ----------
  378.  
  379. Ok, I think it's time to list the parameter options.  The "type" field is 'G' 
  380. for  a  global, 'L' for a local and is neither for the -F  option.   Remember 
  381. that a "/" can be used instead of "-", if you like.
  382.  
  383. Type      Param          Meaning
  384. ----      -----          -------
  385.  
  386.   G       -SE            Sort by extension instead of root name
  387.   G       -SL            Sort output by location (sets -B)
  388.  
  389.   G       -TD            Switch date display mode
  390.   G       -TS            Switch size display mode
  391.   G       -TC            Switch default cursor lock mode
  392.   G       -TO            Use colours for a monochrome screen
  393.   G       -TK            Enable key-board buffering
  394.   G       -TB            Batch mode - intended for re-direction
  395.  
  396.   G       -IL            Inhibit storage of location strings
  397.   G       -IM            Inhibit use of EMS memory
  398.   G       -IX            Inhibit use of XMS memory
  399.   G       -ID            Ignore dates when high-lighting records
  400.   G       -IT            Ignore times when high-lighting records
  401.   G       -IS            Ignore sizes when high-lighting records
  402.   G       -IE            Ignore file extensions
  403.   G       -IU            Ignore details of duplicate files
  404.  
  405.   L       -C             Don't store file details - read contents
  406.   L       -P             Pause until key-press
  407.   L       -D             Descend directories
  408.   L       -W             Switch day/month fields of next source
  409.  
  410.  n/a      -F<pattern>    File name "filter" pattern
  411.   G       -Y<filename>   Make <filename> the temporary file name
  412.   G       -M<letter>     Switch start-up selection mode (<letter> 
  413.                          is one of A,S,D,U,O,N,L,H or T; if the
  414.                          letter is 'T', then a file set number
  415.                          can follow)
  416.   G       -V<mode>       Change to specified (decimal) video mode
  417.   L       +              Directs files into the previous file set
  418.  
  419.   L       {<number>      Loop until following '}', <number> times
  420.   L       }              Loop terminator
  421.  
  422. The -SE option forces CF to store the files in extension order.  That is,  it 
  423. uses  the three characters, in a file name, that appear after any dot in  the 
  424. name.
  425.  
  426. The  batch option, -TB and -SL, should be used when the inter-active part  of 
  427. CF  is to be skipped.  The -SL option is the same as the -TB  option,  except 
  428. that if a single file set is listed, the output comes out in LOCATION  order.  
  429. This  is much slower than the ordinary -TB, but if this file is  subsequently 
  430. loaded  back into CF, it loads quicker and can save a significant  amount  of 
  431. memory.  In batch mode, CF does not display the interactive screen, but  just 
  432. prints  the screen out to standard output so that it can be re-directed to  a 
  433. file, or something.
  434.  
  435. Each  file,  in the batch output, is flagged, after the file date  and  time, 
  436. with an asterisk, dot or space.  The latest file is flagged with an  asterisk 
  437. and  the  earliest  is flagged with a dot.  Other files  just  have  a  space 
  438. instead.  If the line contains any file that has an asterisk or a dot instead 
  439. of the normal space, then the first character of the line will be an  "arrow" 
  440. (in  fact,  a greater-than symbol) so that they are easy to pick out  if  the 
  441. majority  of files in the output have the same date and time.  Note that  the 
  442. output from CF can only be read back into CF if it was produced with only ONE 
  443. file set loaded.
  444.  
  445. Note  that,  at  present,  duplicate file details  do  NOT  appear  in  these 
  446. listings.
  447.  
  448. The  -M  option just allows the user to specify what mode CF will  change  to 
  449. after  loading the files.  It should be used with -TB to get a listing  of  a 
  450. particular  format.   Note that the form -MT<number> can be used;  this  will 
  451. start the system in "all in this file set" mode, using file set <number>.  If 
  452. <number> isn't present, it defaults to the first file set.
  453.  
  454. The display mode parameters, -TD and -TS, affect the start-up display mode of 
  455. the  the  date and size fields respectively.  Note that the  DEFAULT  display 
  456. mode,  toggled by the -TD and -TS parameters, depends on the number  of  file 
  457. sets that are loaded. 
  458.  
  459. Use the -IL option if you are getting short of memory.  CF will NOT store the 
  460. location strings and thus save memory.
  461.  
  462. The -IM option was included in case the detection of EMS caused any problems.  
  463. Also,  CF  should,  in theory, run a little faster if EMS  is  disabled.   Of 
  464. course, using this option will increase the amount of DOS memory used.
  465.  
  466. The  -IX  option was included for the same reason as the -IM parameter  -  to 
  467. ensure  that you could still use CF if the DETECTION of a facility, that  you 
  468. didn't have, caused your system to crash.  By the way, of the three types  of 
  469. XMS  memory  (High  Memory  Area, Extended Memory  Blocks  and  Upper  Memory 
  470. Blocks), CF only uses the UMBs.
  471.  
  472. The "switch cursor mode" option was included for completeness.  After all,  -
  473. TD and -TS were there; why not -TC as well?
  474.  
  475. I  added the -ID and -IT options just because it was easy and I found  a  use 
  476. for  them; I'd recompiled our system, and generated the .EXE file and all  of 
  477. the  overlays.   The program was a few hundred bytes bigger and I  wanted  to 
  478. know why.  Since I'd kept an old copy, what I REALLY needed was a version  of 
  479. CF  that  ignored dates and times (since the last system  I  generated  would 
  480. always  be  the one high-lighted), and only used the SIZE of the  files.   In 
  481. this way, I could see where the increase in size had come from.  (Finding out 
  482. by inspection was error prone - we have fifty overlays in our system.)  So, I 
  483. slapped  the  -ID  and -IT options into CF.  The -IS  option  was  a  natural 
  484. extension of this idea.
  485.  
  486. If  you  do not explicitly select the monochrome colour scheme, via  the  -TO 
  487. option,  CF will decide for itself whether to use mono colours, or not.   The 
  488. normal  colour  scheme is red for the latest file(s), blue for  the  earliest 
  489. file(s)  and  normal video for other file(s).  The settings  colour,  at  the 
  490. bottom  of the screen, is in green.  For monochrome, the "colours" are  high-
  491. intensity, underlined, normal video and high-intensity, respectively.
  492.  
  493. While on the subject of video modes, a few words on screen size; I would have 
  494. preferred  to have supplied ONE copy of CF that coped with ALL screen  sizes.  
  495. However, until I manage to brow-beat JPI (the Modula-2 compiler writers) into 
  496. supplying  libraries that automatically take care of screen size, I  have  to 
  497. supply CF.EXE (25 lines), CF43.EXE (43 lines) and CF50.EXE (50 lines).
  498.  
  499. Unfortunately,  the present JPI libraries have the value, for the  number  of 
  500. columns on the screen, buried in the depths of some assembler code.  While  I 
  501. could  alter this code, I'd rather just limit CF to 80 columns, for now.   (I 
  502. MAY convince JPI, yet - we are a beta-test site for their compilers, and,  in 
  503. the  development  of  out project we, too, required our code to  run  on  ALL 
  504. screen  sizes  (well, up to 200x100, anyway).  So, I patched a few  of  their 
  505. library sources to do this.  In long run, this not a desirable scheme - every 
  506. time they release a new version of their compiler, I'd have to re-convert any 
  507. new  libraries.   If JPI see our product, maybe, just maybe,  they'll  decide 
  508. that it would be a good idea to alter THEIR copies of the libraries.)
  509.  
  510. NOTE:
  511.      As  you may, or may not, have noticed, I HAVE altered the JPI  libraries 
  512.      to  cope  with any screen size from 40 x 25 up to 200 x  100.   However, 
  513.      since  I still feel that JPI ought to adopt this scheme, I've  left  the 
  514.      above  comments in.  By the way, you must already BE in the  video  mode 
  515.      that you want to use - CF will NOT change mode for you.
  516.  
  517. The  -D should be used when you want CF to traverse sub-directories  to  find 
  518. files.   For example, the source "-D \" would all files on the current  disk.  
  519. Note that this is a LOCAL parameter.
  520.  
  521. Some  programs take notice of the country code, or other flag, to  decide  on 
  522. field  order for dates.  For example, in the USA, the normal order is  MM-DD-
  523. YY,  whereas here in the UK it is DD-MM-YY.  Since CF has no way  of  knowing 
  524. the format used to CREATE a text file (rather than the CURRENT date  format), 
  525. I've  added the -W switch.  Setting this local parameter will make CF  switch 
  526. the day and month fields of all files in any text file read.  CF does NOT  do 
  527. this  swap  if reading directly from an MS-DOS directory.  The  provision  of 
  528. this  parameter is a kludge - CF still won't be able to cope with  output  in 
  529. YY-MM-DD  order, if it normally expects it to be in USA or UK format.   (Note 
  530. that  CF works fine with the country code set to "UK", of course, because  of 
  531. the environment under which I develop the program.)
  532.  
  533. CF does NOT buffer keys unless the -TK option is selected.  The trouble  with 
  534. buffering  keys is that, if you keep your finger on, say, the page-down  key, 
  535. and  you see a file go by that you want a closer look at, releasing  the  key 
  536. will  do  no good - DOS will have buffered up 16 down-pages and  you'll  just 
  537. have to back up.
  538.  
  539. The  "ignore  file extensions" option, -IE, was added, like the -ID  and  -IT 
  540. options, because I had need of it when trying to save space on my hard  disk.  
  541. I  have a directory, \OVL, with nearly 300 object (.OBJ) files, and  another, 
  542. \MOD,  with  a similar number of source (.MOD) files.  The  question  is,  is 
  543. there  a .OBJ for each .MOD?  If there is no corresponding object file,  then 
  544. that  module isn't being incorporated into out system when it is  built.   If 
  545. there is no source file, either the object file is from a library module,  or 
  546. we've removed the module and forgotten to delete the old object file.
  547.  
  548. There is one little problem when using the -IE option.  The "name mode"  only 
  549. looks to see if there is more than one file in the current record.  When  NOT 
  550. using  the -IE, this is ok, because all of the file sets, in a given  record, 
  551. have  EXACTLY the same name.  However, when using the -IE option, this is  no 
  552. longer  true - in the above example, one could be, say, P2.OBJ and the  other 
  553. P2.MOD.  These definitely do NOT have the same name, although the "root" (the 
  554. bit  before the dot) IS the same.  For now, I've elected to do nothing  about 
  555. this  problem, other than add code to make CF warn you when you  select  this 
  556. combination of mode and option.
  557.  
  558. If  you  find that CF has detected duplicate file details, you  can  use  the 
  559. RETURN  key  to  cycle through the ones that didn't make it  to  the  screen.  
  560. (That  is, they weren't the "latest".)  In order to save space, you  can  use 
  561. the  -IU option to instruct CF to ignore duplicate details.  The  files  will 
  562. still  be highlighted as duplicates, but you won't be able to view the  other 
  563. file details, because CF will not have stored them.
  564.  
  565. CF  can now accept wild-card file names.  Normally, with DOS programs,  there 
  566. is  no  ambiguity involved.  But consider the file name "*.CF".  If  CF  sees 
  567. this,  should it log the details of the .CF files, or should it READ the  .CF 
  568. files and log the CONTENTS of them?  I have coded CF to default to the former 
  569. action,  but  you can use the -C option to make CF take  the  latter  course, 
  570. instead.  Note that -C is a local option.
  571.  
  572. For a discussion of the -SL option, see the text above that describes the -TB 
  573. option.
  574.  
  575. Using  the  -P option makes CF pause, after displaying  a  suitable  message, 
  576. until  a key is pressed.  Use this before multiple logs of a diskette  drive, 
  577. while inside a loop.
  578.  
  579. The  use  of  the + option is explained above - just  place  it  between  all 
  580. sources that should contribute to the same file set.
  581.  
  582. The looping parameters are primarily intended for logging multiple diskettes.  
  583. For  example, if you want to log four floppy disks, into separate file  sets, 
  584. in order to compare them, use something like this:
  585.  
  586. (5)       CF {4 -P -D A:\ }
  587.  
  588. If  you  don't use the -P, of course, CF will give you no  chance  to  change 
  589. diskettes, and will re-log the first diskette four times.
  590.  
  591. Loops  can  be nested to a depth of ten (I think).  The loop  count  must  be 
  592. greater than one.
  593.  
  594. The  -F option allows you to specify a file name "filter" that CF will  apply 
  595. to  ALL  file  names as they "logged" into its data-base.   Although  CF  can 
  596. accept wild-card names as file sources, there may be a requirement to vet the 
  597. names  CONTAINED in those sources, as well.  For example, say I want to  load 
  598. all  .CF files, on the current drive, but only log .DEF and .MOD  files  FROM 
  599. those .CF files.  This is how you would do that:
  600.  
  601. (6)       CF -F*.MOD;*.OBJ -D -C \*.CF
  602.  
  603. This  is broken down, thus: the last item selects the files to be  read,  and 
  604. the  -C makes sure that the files are READ rather than having  their  details 
  605. logged.  The -D makes CF descend all directories, from the root down.  The -F 
  606. option  says that only the .MOD and .OBJ files are to be logged from the  .CF 
  607. files.   Note that if a file name pattern is preceded by a minus  sign,  this 
  608. has the effected of EXCLUDING files.  For instance, if, in the above example, 
  609. I  didn't want to see the files that started with an 'M', I would  alter  the 
  610. command to read:
  611.  
  612. (7)       CF -F*.MOD;*.OBJ;-M*.* -D -C \*.CF
  613.  
  614. Note  that CF does NOT use the same "language" for the patterns as DOS.   For 
  615. example, "-Fc*r.*" would select all files that started with a 'C' and had  an 
  616. 'R' before the dot.  DOS, if you supplied this to DIR, would merely give  you 
  617. all files that STARTED with a 'C'.  (I notice that 4DOS doesn't, though -  it 
  618. gets  it "right".)  There is one slight "funny" - if you enter "CF  *",  then 
  619. ALL  files will be logged.  You need to use "CF *." to get all files with  no 
  620. extension.  (The code that does this pattern matching is provided by calls to 
  621. a  JPI library.  I use Str.Match() on the file name strings.  If you want  to 
  622. know EXACTLY what the syntax and semantics are, consult the JPI documentation 
  623. or library source code.)
  624.  
  625. When  CF  accesses  archived files (.ZIP, .ARC, etc.), it  runs  one  of  the 
  626. archiving  utilities and re-directs the output to a temporary file.   If  you 
  627. want the file to go anywhere other than the current directory, then use the -
  628. Y  option to over-ride the default name.  There must, of course, be no  white 
  629. space  between the '-Y' and the file name.  The reason for the  provision  of 
  630. this  parameter,  was  to  speed things up when  listing  an  archive  off  - 
  631. redirecting output tends to "rattle" the disk drive somewhat.  In my case,  I 
  632. use -Y to make the temporary file reside on my RAM disk.
  633.  
  634. The  -M  option  allows you to alter the default  selection  mode.   If,  for 
  635. example,  you want to start in "different files" mode, enter -MD as  part  of 
  636. the  parameter  list.  This would normally be used in  conjunction  with  the 
  637. "batch mode" options, -TB or -SL.
  638.  
  639. If  you  want to customise the video mode, while CF is running,  use  the  -V 
  640. parameter.  At present, the only option is to change to a mode and, if you do 
  641. NOT  use  the no-screen-clear exit path (see the KEYS section),  change  back 
  642. just  before exiting.  For example, to change to the super-VGA  132x43  mode, 
  643. use "-V84", as in "CF . -V84".  Graphics modes will NOT work because the  JPI 
  644. (TopSpeed) supplied windowing library writes directly to the video memory.
  645.  
  646.  
  647.  
  648. CF OUTPUT AS A SOURCE
  649. ---------------------
  650.  
  651. CF  can accept it's own output as input.  The idea is to allow you to use  CF 
  652. to dump the directory structure off of a remote machine, and have CF load  it 
  653. back  on your local machine.  You can use the -TB option to get the  loadable 
  654. output  format and re-direct it to a file, or use the "create list file"  key 
  655. (see  help).   In order to create a file that CF can read back in,  you  must 
  656. have only ONE file set loaded.  The format produced is DIFFERENT if more than 
  657. one  file  set  is loaded.  Also, be aware of the fact that  the  listing  is 
  658. produced in a different order depending on whether the -TB option or the  -SL 
  659. option  is used to produce it.  If -SL is used, then the listing will  be  in 
  660. LOCATION  order.   This will take VERY much longer than the other  method  of 
  661. producing  a  list file, because it has to scan the data-base once  for  each 
  662. location string.  (I know, this is a bit poor, but maybe I'll alter it  later 
  663. on.)  The good news is that it can save an appreciable amount of memory.  For 
  664. example,  I produced three listing files of my "C:" drive.  The first was  in 
  665. location  order, the second was in file order, and the last was in  extension 
  666. order.   Then I loaded them back in and they used 146848, 184560  and  181824 
  667. bytes  of  memory,  respectively.   By the way,  using  -SL  means  that  the 
  668. resulting file LOADS a bit quicker as well. 
  669.  
  670. CF allows you allows you to compare the directory structure on two  different 
  671. machines,  if you don't have a copy of any other utility that can do  a  full 
  672. directory dump.  In my case, on the remote machine, I use:
  673.  
  674. (8)       CF -D C:\ + -D D:\ + -D E:\ + -D F:\ -TB > REMOTE.CF
  675.  
  676. This will grab an image of the remote directory structure, and save it in the 
  677. file  REMOTE.CF.  Note that there is only ONE file set loaded and  it's  THIS 
  678. that makes CF append the location string to each line in REMOTE.CF.  This  is 
  679. why  CF will only accept it's single file set output as input.   Having  done 
  680. this, on the local machine I type:
  681.  
  682. (9)       CF -D C:\ + -D D:\ + -D E:\ + -D F:\ -SE REMOTE
  683.  
  684. This will load the directories on the local machine into the first file  set, 
  685. and  REMOTE.CF  from  the remote machine into the  second  file  set.   Then, 
  686. compare the file sets in the normal way.
  687.  
  688.  
  689.  
  690. ARCHIVES
  691. --------
  692.  
  693. CF can directly access .ARC and .ZIP archive files to extract a listing file.  
  694. However,  it DOESN'T read the files itself, but uses one of  the  stand-alone 
  695. utilities  via the DOS "exec" function.  Thus, for this facility to work  you 
  696. must have one of the utilities, that can produce listings from archive files, 
  697. already on your "path".  The utilities that will be used, if present, are
  698.  
  699.      .ZIP      PKUNZIP, PKZIP, FV
  700.      .ARC      PKUNPAK, PKPAK, PKXARC, PKARC, FV, ARC
  701.      .EXE      FV, PKUNZIP, PKZIP
  702.      .LZH      LHARC
  703.  
  704. in  that  order.   (The .EXE files are self-extracting  archive  files.  Some 
  705. software is supplied in this form.)
  706.  
  707. The  archive  accesses  can  also be  done  using  the  wild-card  mechanism.  
  708. However,  for CF to try to access the files, rather than use their  directory 
  709. information,  you must use the -C option, just as for text files.  (In  fact, 
  710. archive  listings ARE text files - CF redirects standard output and  standard 
  711. error output to a temporary file, executes the relevant archive program, then  
  712. reads the resulting output back in.)
  713.  
  714. For example, to read all .ZIP files on drive C:, use this:
  715.  
  716. (10)      CF -D -C C:\*.ZIP
  717.  
  718. Note the -D (descend directories) and the -C (read as text files).
  719.  
  720.  
  721.  
  722. VIEWING AND EDITING
  723. -------------------
  724.  
  725. CF can, by using external programs, edit and view text files.  The  mechanism 
  726. used  is  similar to that employed when invoking programs that  extract  file 
  727. lists from archived files.  Therefore, in order for this feature to work,  an 
  728. editor  and  viewing  program  must reside somewhere  on  your  search  path.  
  729. (Hereinafter, for "editor", read "editor or viewer".)
  730.  
  731. The  only constraint on these editing programs, is that they must be able  to 
  732. be  started with the target file as a command-line parameter.  For  instance, 
  733. that  well-known  text  editor,  WordStar,  can  edit  a  non-document  file, 
  734. "TEXT.DOC", by supplying a command line of the form "WS TEXT.DOC N".  CF  can 
  735. be  configured,  albeit  very crudely at present, to  provide  any  necessary 
  736. parameters  in  addition  to the target file name.   (For  the  configuration 
  737. options, see the CONFIGURATION section.)
  738.  
  739. In  order  to avoid memory problems, it is advisable to  use  small  editors, 
  740. especially  if they are of the sort that loads the WHOLE file  contents  into 
  741. memory.   Also,  they should not alter the video attributes  while  they  are 
  742. running since CF will NOT restore them afterwards.
  743.  
  744. CF takes notice of the current screen size (in rows and columns) and  editors 
  745. that  do the same will get along with CF much better than those  that  don't.  
  746. (The editor "QEDIT" and the viewer "LIST" are very well behaved in this sense 
  747. - you'd think that they were part of CF itself.)
  748.  
  749. If,  by using the keys that allow editing or viewing, or by use of  the  help 
  750. keys, you invoke an editor, you may get a message saying that the file cannot 
  751. be found.  CF can only edit a file if it resides in the location specified in 
  752. the file's source.  In particular, watch out for the situation where you  use 
  753. a .CF file, containing text from another machine, that cites a file that  has 
  754. the  same name, and is in the same DIRECTORY as a file on YOUR machine  -  CF 
  755. will  happily edit the file on your machine even though the contents  may  be 
  756. quite different to that on the other machine.
  757.  
  758. By  the  way, CF does NOT update it's internal information when  you  edit  a 
  759. file, so, on the screen, it will appear that the file date and size have  not 
  760. altered.  You have been warned; CF is intended as a directory comparator, not 
  761. a file management system.
  762.  
  763. Finally,  a quick word on the auto-view (ALT-V), auto-edit (ALT-E) and  auto-
  764. batch  (ALT-O)  modes.  I'll only explain auto-view since the other  two  are 
  765. very similar.
  766.  
  767. Imagine that you want to view many files, one after the other, and that  each 
  768. is next the previous one and can be reached by just a single cursor-movement.  
  769. Rather  than go though the sequence move-cursor, invoke-viewer,  exit-viewer, 
  770. CF  allows  the middle step to be avoided.  If you use  auto-view  mode,  the 
  771. viewer  will be invoked for the current file.  Thereafter, each time you  use 
  772. one  of  the short-range movement keys (cursor-up,  cursor-down,  etc.),  the 
  773. viewer  will automatically be entered.  Exit auto-view by  just  re-selecting 
  774. it,  or  you can enter auto-edit or auto-batch modes directly  by  using  the 
  775. relevant key.
  776.  
  777.  
  778.  
  779. XTGOLD FEATURES
  780. ---------------
  781.  
  782. Some  file utilities (Xtree Gold, Norton Commander, etc.) allow the  user  to 
  783. easily invoke a program, depending on the "current" file, with a single  key-
  784. stroke.
  785.  
  786. For  example, in XTGOLD, if the user's current file is, say, "TEST.DOC",  and 
  787. you have a batch file "DOC.BAT" in the XTGOLD directory, then XTGOLD will run 
  788. this batch file if you press "O", "o" or "ALT-O".  So that you can access the 
  789. current  file, XTGOLD fills in several parameters before invoking  the  batch 
  790. file.
  791.  
  792. I  thought  that  it would be a good idea if CF could also  run  these  batch 
  793. files.  So, I implemented a version of XTGOLD's "O" command.  (However, there 
  794. is  NO equivalent of the ALT-O command - CF ALWAYS uses only free  memory  to 
  795. execute  programs.)  The only pre-requisite is that the user has  defined  an 
  796. environment variable, CFXTGOLDDIR, that "points" to the directory that  holds 
  797. the batch files.
  798.  
  799. For example, let us assume that I want to be able to invoke WordStar when the 
  800. current  file is a .DOC file.  First, I have to make a directory, place  it's 
  801. name  in the aforementioned environment variable, and create  DOC.BAT.   This 
  802. would contain something like:
  803.  
  804.           WS %4.%5 D
  805.  
  806. The  "%4.%5"  represents the current file name.  So that the batch  file  can 
  807. access various information, several things are passed down as parameters:
  808.  
  809.           %1   The full file path name.
  810.           %2   The drive letter (no colon)
  811.           %3   The path name (no drive or file name)
  812.           %4   The file name (no extension)
  813.           %5   The extension name
  814.  
  815. If the current file name was, say, A:\B\CC.DDD, then the parameters would be:
  816.  
  817.           %1   A:\B\CC.DDD
  818.           %2   A
  819.           %3   \B
  820.           %4   CC
  821.           %5   DDD
  822.  
  823. Hence, in the above example, our command line would be:
  824.  
  825.           WS CC.DDD D
  826.  
  827. XTGOLD has another way to invoke small "batch files" - the Application  Menu.  
  828. In  both  CF  and  XTGOLD, you use the F9 key to bring  up  a  menu  of  pre-
  829. configured  items that allow you to start a "batch file" of commands  on  the 
  830. current file.  The reason for the quotes is that they are NOT, in fact, batch 
  831. files.  The little macros are kept in a file called XTG_MENU.BIN.  Using  the 
  832. environment variable, CFXTGOLDDIR, you can tell CF where to find this file so 
  833. that it can run the macros contained in it.  However, you have to use  XTGOLD 
  834. to edit it.  Since you must be familiar with this XTGOLD facility in order to 
  835. edit  this file, I'll say no more.  (The normal keys work in the  application 
  836. menu - use ESCAPE to bail-out and RETURN to select an item to run.)
  837.  
  838.  
  839.  
  840. NORTON COMMANDER FEATURES
  841. -------------------------
  842.  
  843. The  emulation of the Norton Commander (NC) menu and "batch file"  facilities 
  844. have  been  accomplished  by  converting  the  NC  files  into  their  XTGOLD 
  845. equivalents and using the existing code.  So, if you use F2 to invoke the  NC 
  846. menu, CF actually reads the NC menu file, outputs a temporary file containing 
  847. the  XTGOLD  version  and then uses existing code to  display  and  obey  the 
  848. commands required.  Therefore, limits which NC do NOT enforce apply while you 
  849. use  CF.  In particular, you can have only a limited number of lines  on  the 
  850. menu,  and a limited number of executable "batch" lines associated with  each 
  851. named  line and that the user-specified key assignments are NOT obeyed.   (In 
  852. the latte case, this measn you can ONLY start an entry by using RETURN.)
  853.  
  854. The "run this file" facilities of XTGOLD are also emulated when using the  NC 
  855. extension  file.   When RETURN is pressed, the NC extension file  is  scanned 
  856. and, if an applicable entry is found, the NC special "!" items are  converted 
  857. into  XTGOLD special "%" items and a temporary batch file is  created.   This 
  858. batch file is then run.  By the way, if CF can't find a line to use in the NC 
  859. extension  file, then it behaves as if you'd used the 'O' key to  invoke  the 
  860. XTGOLD stuff instead.
  861.  
  862. Note  that  in  order to find these NC files, CF looks  for  the  environment 
  863. variable  "CFNCDIR".   If  that  doesn't  exist,  it  uses  the  standard  NC 
  864. environment variable "NC" instead.
  865.  
  866.  
  867.  
  868. CONFIGURATION 
  869. -------------
  870.  
  871. CF  can  be  configured with reference to the archive,  editing  and  viewing 
  872. programs  that  it will invoke, parameter values that must be  used  for  ALL 
  873. invocations  of CF and various other items.  Be warned that these  facilities 
  874. are liable to change as I improve CF.
  875.  
  876. NOTE:     AT  PRESENT,  CF STORES ALL ITEMS FROM THE CONFIG FILE  IN  STRINGS 
  877.           THAT  ARE  FIFTEEN  (15)  CHARACTERS  LONG.   LONGER  STRINGS   ARE 
  878.           TRUNCATED.  YOU HAVE BEEN WARNED.
  879.  
  880. At  present,  it  works like this: at start-up, CF  searches  a  file  called 
  881. CF.INI, that must be in the directory from whence CF was started or specified 
  882. by  the  environment variable CFCFGNAME.  Before CF will take notice  of  the 
  883. text in this file, it must find a "header" containing the string "[CF]".  For 
  884. an  explanation of this convention, see later in this section.  Each  of  the 
  885. other lines in the file has one of following forms:
  886.  
  887. (a)  PROGARCH <match> <progname> <beforeparams> <afterparams>
  888.      PROGVIEW <match> <progname> <beforeparams> <afterparams>
  889.      PROGEDIT <match> <progname> <beforeparams> <afterparams>
  890.  
  891.      The  first string identifies the purpose for which the program named  in 
  892.      <progname> is intended.  The <match> entry is a file name, which MAY  be 
  893.      wild-carded,  that specifies which set of files <progname> can  process.  
  894.      The  <beforeparams>  string is placed between the program name  and  the 
  895.      file name, and <afterparams> is placed between the file name and the end 
  896.      of  the  command  line.   In  both  of  these  strings,  all  under-line 
  897.      characters  ('_') are replaced by spaces since CF does NOT add it's  own 
  898.      spaces between the different components of the command line.
  899.  
  900. (b)  PARAMETER <parameter>
  901.  
  902.      The <parameter> is a string just as you would type on the command  line.  
  903.      CF scans these configured parameters, and they get processed BEFORE  the 
  904.      command  line  parameters.  Of course, if the configued  parameters  are 
  905.      GLOBAL  parameters,  it doesn't matter WHERE they appear.   However,  if 
  906.      they are not global, then it DOES.
  907.  
  908. (c)  VARIABLE <name> <value>
  909.  
  910.      This  facility allows you to pass an environment variable to CF  without 
  911.      having  to use a real environment variable to do it.  The <name>  string 
  912.      is  the  name of the environment variable that you wish  to  define  and 
  913.      <value> is the value that it should hold.  When it requires a particular 
  914.      environment variable, CF searches the config file for a "VARIABLE"  line 
  915.      BEFORE  searching  the  real  MS-DOS  environment  variable  list.   For 
  916.      example, if you want to have "H:\!.!" as the temporary file name that CF 
  917.      will  use,  you  can do one of two things;  define  a  real  environment 
  918.      variable  by  using "SET CFTEMPNAME=H:\!.!" at the MS-DOS  command  line 
  919.      prompt, or put a line like "VARIABLE CFTEMPNAME H:\!.!" into your config 
  920.      file.
  921.  
  922.      There are two situations where overriding an environment variable  won't 
  923.      work.  The first is CFCFGNAME; this won't work because the re-directions 
  924.      are  in the config file and this is already open when the  re-directions 
  925.      are loaded.  The other is the PATH variable; this won't work as a result 
  926.      of the internal structure of CF.
  927.  
  928. (d)  RECOGNISE <extension>
  929.  
  930.      This  allows you to make CF automatically recognise certain file  types.  
  931.      For example, by using "RECOGNISE .CF" in your .INI file, CF will, if you 
  932.      specify just the root file name, automatically add the extension  ".CF".  
  933.      What actually happens is this: CF decides whether the file name you type 
  934.      has  any  wild-card  characters  in it.  If it  DOES,  then  this  auto-
  935.      recognition  is  NOT invoked.  Otherwise, it is deemed to be  a  "single 
  936.      load"  and  CF  tries to open the file.  If it  doesn't  exist  AND  the 
  937.      specified name does NOT contain a "dot" character, then CF searches  the 
  938.      config information looking for the recognition lines.  For each one,  it 
  939.      merely  appends the <extension> onto the specified file name  and  tries 
  940.      THAT.   This process stops when either it FINDS a file or there  are  no 
  941.      more recognition lines.
  942.  
  943.      Note that "RECOGNISE .ZIP" will mean that you can say "CF X" instead  of 
  944.      "CF  X.ZIP".  Also note that although CF checks that the  supplied  name 
  945.      doesn't  contain  an extension, the <extension> does NOT have  to  start 
  946.      with  a dot - something like "RECOGNISE X.YYY" is perfectly  acceptable.  
  947.      In  this case, "CF A" would get converted into "CF AX.YYY" if  the  file 
  948.      "A" didn't exist.
  949.  
  950. Ok, so what does a typical config file have in it?  Here is a typical  CF.INI 
  951. file:
  952.  
  953.           [cf]
  954.           parameter -se
  955.           recognise .cf
  956.           variable  cftempname h:\!.!
  957.           progarch  *.zip  pkunzip  _-v_  _
  958.           progarch  *.arc  pkunpak  _-v_  _
  959.           progarch  *.arc  pkarc    _-v_  _
  960.           progarch  *.arc  fv       _     _
  961.           progarch  *.arc  arc      _v_   _
  962.           progarch  *.exe  fv       _     _
  963.           progarch  *.exe  pkunzip  _-v_  _
  964.           progarch  *.lzh  lharc    _l_   _
  965.           progview  *.*    list     _     _
  966.           progedit  *.*    q        _     _
  967.           progedit  *.*    ws       _     _n
  968.  
  969. The  "parameter"  line  just makes sure that CF will  ALWAYS  sort  files  by 
  970. extension,  "recognise  .cf"  means  that you would  not  have  to  type  .CF 
  971. extensions and the "variable" line makes CF use H:\!.! as the temporary  file 
  972. name.
  973.  
  974. The  rest  are  external program specifications.  If CF is asked  to  use  an 
  975. archiver  to process a file called, say, "FILE.LZH", it will scan the  config 
  976. file,  searching lines starting with "PROGARCH", until it comes to the  entry 
  977. that contains "LHARC".  Then, it will concatenate the program name, the  pre-
  978. text, the file name and the post-text to make a command line like this :
  979.  
  980.           "LHARC L FILE.LZH "
  981.  
  982. This  is what actually gets executed.  Note that in ALL cases, the  extension 
  983. (in this case, ".LZH") is retained in the command line.
  984.  
  985. I  would recommend that you do NOT alter the program entries in the  supplied 
  986. CF.INI file.  It might appear that the entries are in an arbitrary order, but 
  987. I  assure you that they are NOT; I found that the different archive  programs 
  988. all  had their funny little ways, and that the table, as it stands,  produces 
  989. the best results.  (However, one thing you might try is to move the FV  lines 
  990. closer  to  the front of the file.  FV is much quicker at  producing  archive 
  991. listings  than the other programs.  The only trouble I have found  with  this 
  992. modification,  is  that it can cause problems when processing  archives  that 
  993. have  a .EXE extension.  See stuff in the BUGS section that releates  to  FV, 
  994. too.)
  995.  
  996. By  the way, a program can appear more than once in the config file.  So,  to 
  997. view .EXE and .COM files in hex, you could use:
  998.  
  999.           progview  *.com  list     _     /h
  1000.           progview  *.exe  list     _     /h
  1001.           progview  *.*    list     _     _
  1002.  
  1003. The "*.*" entries in these lines are there as a sort of "catch-all".  If  the 
  1004. target file doesn't match any preceding program, they'll be processed by  the 
  1005. program that has "*.*" as a match pattern.  (The pattern matching is the same 
  1006. as for the -F parameter.)
  1007.  
  1008. CF will only process lines that are preceded by a line containing nothing but 
  1009. "[CF]".   (This  is intended to be compatible with  the  Microsoft  TOOLS.INI 
  1010. file.)   This  allows the configuration stuff to be placed in a  common  area 
  1011. with  other programs' information.  Also note that, if you rename  CF.EXE  to 
  1012. CFX.EXE, say, the header will have to be "[CFX]".
  1013.  
  1014. CF  will ignore any lines that do not start with an item that it  is  looking 
  1015. for.  The result of this is that lines that start, for example, "REMARK" will 
  1016. be  ignored.   Use this fact to incorporate comments into  the  config  file.  
  1017. Also,  you should be able to place comments at the end of each line since  CF 
  1018. will ignore any extra text, but if you do this on "prog****" lines, they must 
  1019. NOT  have  any items missing before the comment or the comment text  will  be 
  1020. used to generate de-arch, edit and view command lines.
  1021.  
  1022. This  file can be re-loaded by using SHIFT-F10.  This means that, if the  one 
  1023. of  the  currently loaded file sets has the .INI file in it, you can  use  an 
  1024. editor  to  alter it and then re-load it using SHIFT-F10.   Very  useful  for 
  1025. getting  your .INI just right...  (Note that the parameter lines are NOT  re-
  1026. processed by CF - they only apply the first time the config file is read.)
  1027.  
  1028.  
  1029.  
  1030. KEYS
  1031. ----
  1032.  
  1033. If  you press F5 or the question mark key, CF will display a page  of  useful 
  1034. information.   The first line consists of three numbers for DOS memory and  a 
  1035. another  three for EMS (if it's enabled).  The first is the amount of  memory 
  1036. CF  started out with, the second is the amount it's got now and the  last  is 
  1037. the  difference  between the first two - in other words, it's the  amount  of 
  1038. memory  that's  required to store the files that you have  currently  loaded.  
  1039. The  numbers for EMS memory are calculated in a similar manner.  The rest  of 
  1040. the page just lists the full source names of the file sets, and the  start-up 
  1041. and current options list.  Pressing F1 produces, not surprisingly, a  summary 
  1042. help  file.   If  you  use SHIFT-F1 in place of F1, you  get  the  THIS  file 
  1043. instead.
  1044.  
  1045. In order to exit CF, you can use several different keys.  At present, any one 
  1046. of ESCAPE, 'Q', 'q', ALT-Q or CTRL-Q will exit CF after clearing the  screen.  
  1047. The screen clear can be avoided by using 'X', 'x' or ALT-X instead.  (You may 
  1048. ask  why  this  was added; on my system, I have a colour screen  AND  a  mono 
  1049. screen.  I can now change to the mono screen, invoke CF and exit WITHOUT  the 
  1050. screen  clear, and then change back to the colour screen.  In this  way,  the 
  1051. details  of the last CF screen are still displayed on the mono screen, but  I 
  1052. can act on that information by running programs which display their output on 
  1053. the colour screen.)
  1054.  
  1055. Other active keys are F3 (toggle size/no size display), SHIFT-F3 (toggle date 
  1056. size),  and  F4  (toggle cursor lock mode).  Duplicate file  details  may  be 
  1057. viewed  by using SPACE.  You can interrupt CF, while it is loading  files  or 
  1058. generating  output files, by pressing escape.  Use F9 to invoke  the  XTGOLD-
  1059. compatible  application  menu  and F2 to use the NC  version.   Also,  if  it 
  1060. displays any error or warning messages, type any key to continue.
  1061.  
  1062. Instead of using the -TB and -SL options to produce listings from CF, you  do 
  1063. it  interactively  by  using F6 (list in file order) and  SHIFT-F6  (list  in 
  1064. location  order - the slower alternative).  They both produce a  file  called 
  1065. CFOUTPUT.LST,  unless there is only one file set loaded, in which  case  it's 
  1066. called CFOUTPUT.CF.
  1067.  
  1068. If  you  want  to  alter the sort order of the  files  from  by-name  to  by-
  1069. extension, or vice versa, use F10.  There are two little problems with  this, 
  1070. at  present.  The first is that it can be a slow operation if you re-order  a 
  1071. large  number  of files.  Secondly, you may lose memory  for  each  re-order, 
  1072. although each loss will DECREASE the more you do it.  As far as I know,  this 
  1073. is  due to the action of one of the few modules, used in CF, that I  did  NOT 
  1074. write.  I may investigate it later on.  On the other hand, I may not... 
  1075.  
  1076.  
  1077.  
  1078. TAGGING
  1079. -------
  1080.  
  1081. Like  XTREE, XTPRO, XTGOLD, MAGELLAN, and so on, CF now lets you "tag"  (that 
  1082. is,  mark) files.  The button conventions are similar to all of the  programs 
  1083. mentions  above.  Basically, a button on its own operates on the  file  under 
  1084. the large "cursor", with the control key down it operates on all files in the 
  1085. current  file set and, with the alt key, it operates on ALL files.  Thus,  to 
  1086. tag  the current file, use 'T' (or 't'), to tag all in the current file  set, 
  1087. use CTRL-T, and to tag all files use ALT-T.  The 'U' equivalents untag  files 
  1088. and the 'N' versions invert (ie, toggle) the tags.
  1089.  
  1090. At  present,  the only thing that you can do with tagged files is  to  get  a 
  1091. "batch"  file  output (by using F7).  In fact, this just consists of  a  file 
  1092. with the file names of all tagged files in the file set under the cursor.   I 
  1093. hope, eventually, to prefix the relevant location string onto each file,  and 
  1094. maybe  to  even accept a command line "mask".  We'll see.  The  name  of  the 
  1095. file, by the way, is CFOUTPUT.BAT.  (Hard-coded, at the moment.)
  1096.  
  1097.  
  1098.  
  1099. BUGS GALORE
  1100. -----------
  1101.  
  1102. This  section gives a little information on known CF problems, and bugs  that 
  1103. I've come across in the programs that produce output for CF.  First, MY bugs:
  1104.  
  1105. (a)  In one of the CF examples, it was suggested that you could use "CF . .." 
  1106.      to  compare your current directory contents with its  parent  directory.  
  1107.      However,  there  is a little problem doing this under  MS-DOS  3.2.   It 
  1108.      don't  work.   You have to use "..\" instead of "..".  Although  I  know 
  1109.      there is a problem here, unless other bug investigations throw light  on 
  1110.      the  cause, I don't intend to do anything about it - MS-DOS is a  shitty 
  1111.      "operating  system",  running  on a shitty type  of  computer,  and  I'm 
  1112.      definitely NOT going to spend the rest of my life learning all about the 
  1113.      shitty  versions  of  both of these abortions.  If  you  KNOW  why  this 
  1114.      difference  exists,  and can tell me a (simple) cure, I'll fix  it.   If 
  1115.      not, then forgot it.  I develop using a '386 machine running 3.3  MS-DOS 
  1116.      and that's as far back into the dark-ages as I'm prepared to go.
  1117.  
  1118. (b)  When you are in a root directory, "." doesn't work.  You have to use "\" 
  1119.      instead.   On  a proper operating system (say Unix), the  "."  would  be 
  1120.      expanded  to the full path name and CF wouldn't even SEE the  short-hand 
  1121.      notation.  However, MS-DOS isn't, so CF does.  Clearly, I'll have to try 
  1122.      to cope with all of these "funnies" eventually, but I'm only willing  to 
  1123.      do  this if get more user feed-back - if there ARE no other  users  than 
  1124.      me,  I'm wasting my time 'cos CF does (nearly) everything that *I*  want 
  1125.      it to do.
  1126.  
  1127. (c)  See  the documentation of the -W parameter for a discussion of a  little 
  1128.      problem  with date formats.  (It's connected with the fact that some  of 
  1129.      the  programs  that produce CF readable output use the country  code  to 
  1130.      decide on the date format to be used.)
  1131.  
  1132. (d)  I configure CF to run CF when I use RETURN or 'O' to invoke programs  by 
  1133.      extension  on .ZIP files.  So, when I load a directory into a  file  set 
  1134.      and  it  contains  a .ZIP file, I can move the cursor to  it  and  press 
  1135.      RETURN and it will run ANOTHER copy of CF but, this time, just accessing 
  1136.      and  unpacking  the  .ZIP.  This works fine except for  one  thing:  the 
  1137.      second incarnation of CF doesn't see any EMS memory AT ALL.  The  reason 
  1138.      is that the EMS module I use grabs ALL EMS memory unless told otherwise.  
  1139.      One day, I'll see if I can't make it release all un-allocated EMS during 
  1140.      the period that it has started a child process.  Until then, your  stuck 
  1141.      with this little "feature".
  1142.  
  1143. Now,  the  Rest Of The World's bugs.  Apologies to the  relevant  authors  if 
  1144. these "bugs" turn out to be MY problem:
  1145.  
  1146. (a)  There  appears  to  be a bug in MAGELLAN 2.0 - ZIP  listings  show  each 
  1147.      file's minute field as zero if the date and time format is set to show a 
  1148.      four  digit year field.  Luckily, CF can cope with the other  year-first 
  1149.      formats, so there IS a way around it.
  1150.  
  1151. (b)  If  the  date  and time of a file in an  archive  is  00-00-1980,  older 
  1152.      versions of FV fill the date and time fields with "dd mmm yy" and  newer 
  1153.      versions  use  spaces.  CF can cope with this, but note that  the  older 
  1154.      versions, that should use "dd mmm yy", appear to have a bug whereby they 
  1155.      sometimes  fill  the date and time in from a PREVIOUS  files'  date  and 
  1156.      time.   CF cannot detect when this happens.  (Also, it appears that  the 
  1157.      seconds field is wrong in the older version - CF doesn't use seconds  in 
  1158.      time comparisons at the moment, but one day, it MAY do...)
  1159.  
  1160. (c)  While  testing the code that copes with the configuration file, I  found 
  1161.      that a .LZH file wasn't being processed properly.  If I used LHARC, from 
  1162.      the command line, to produce a text file (that is, a .CF file), all  was 
  1163.      alright.   However,  if  I invoked LHARC from within CF,  by  using  "CF 
  1164.      TEST.LZH  -SE", then the resulting (temporary) .CF file had  a  spurious 
  1165.      CR-LF pair in the middle of a line of text.  As a result, this file  was 
  1166.      skipped  by  CF.   At the moment, I don't know why  this  should  occur.  
  1167.      (Ostensibly, this is a LHARC problem, but I'm throwing no stones yet;  I 
  1168.      know that I'm living in a glass house...)
  1169.  
  1170. (d)  Back to FV.  Somehow, I've managed to get a file with a time and date of 
  1171.      00:00:00 on 01-01-98.  FV (versions 1.16, 1.28 and 1.32 at least)  don't 
  1172.      seem to like this.  They each get the time correct, but show the date as 
  1173.      "01 Jan ;8".   Not  surprisingly,  CF can't  cope  with  the  semi-colon 
  1174.      instead  of a valid digit in the year field and throws a  wobbler.   The 
  1175.      solution  is to use something else rather than FV.  (Now you know why  I 
  1176.      have  reservations about using FV as the default archive lister  -  it's 
  1177.      not as reliable as PKZIP, et al, although, I admit, it IS faster.)
  1178.  
  1179.  
  1180.  
  1181. DISCLAIMER
  1182. ----------
  1183.  
  1184. These  days, all P.D. software documentation files seem to have a  disclaimer 
  1185. in them some where.  So, here goes...
  1186.  
  1187.      "I  hereby  disclaim all warranties relating to this  software,  whether 
  1188.      express or implied, including without limitation any implied  warranties 
  1189.      of  merchantability or fitness for a particular purpose. I will  not  be 
  1190.      liable  for any special, incidental, consequential, indirect or  similar 
  1191.      damages  due  to loss of data or any other reason, even if I  have  been 
  1192.      advised  of  the  possibility of such damages.  In  no  event  shall  my 
  1193.      liability  for  any damages ever exceed the price paid for  the  license 
  1194.      (bugger  all) to use the software, regardless of the form of the  claim.  
  1195.      The  person  using  the software bears all risk as to  the  quality  and 
  1196.      performance of the software."
  1197.  
  1198. In  case  you're wondering how I dreamed up that waffle, I'll tell  you  -  I 
  1199. nicked it from PKWARE's disclaimer in their PKZIP documentation.  So, now you 
  1200. know.
  1201.  
  1202.  
  1203.  
  1204. CONCLUSION
  1205. ----------
  1206.  
  1207. The limit on the number of files that can be loaded, besides those set by the 
  1208. amount  of available memory, is that you can load up to 65535 files.   (Guess 
  1209. why...)
  1210.  
  1211. Note  that  this  program (key assignments, display  layout,  file  selection 
  1212. modes,  and  so on), is likely to change as I get feed-back, or I  damn  well 
  1213. feel  like it - if you get a new version, and it doesn't behave the  same  as 
  1214. the   previous   version,  then  just  play  around  to   see   what's   new.  
  1215. Alternatively, you COULD read the documentation, if I supply any.  (Mind you, 
  1216. THAT may well lie about things, if I miss a change or two.)
  1217.  
  1218. Finally, I'll just say that *I* find CF useful.  As a matter of fact, to give 
  1219. version  0.2  a bit of a test, I compared the sources of our  system  on  our 
  1220. three  machines.   By inspecting the output, I found that  we'd  shipped  the 
  1221. latest version of our software with a bug fix missing.  (Run around with head 
  1222. cut off, make new version, ship it and hope none of the users noticed...)
  1223.  
  1224.      Mark Davis.
  1225.  
  1226.