home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / newc_dev / dr_15b.lha / Dr.doc < prev    next >
Text File  |  1992-11-01  |  30KB  |  529 lines

  1.  
  2.                                   DR         (release 1.5b)
  3.  
  4. What we got here is Yet Another CLI Directory Listing Command, called Dr
  5. (pronounced "dr", one syllable) because it leaves out .info files.  (Like,
  6. the missing I in Dir stands for .info ...? never mind.)  It is a very fast
  7. and full featured program which is superior to all of the ten or so other
  8. Amiga directory listers I've tried.  I couldn't live without it.  Even its
  9. half-finished versions were preferable to Dir.  The features it offers are:
  10.  
  11.   + By default, .info files are not mentioned in the output.  Instead, it
  12.     shows you which files have *.info files associated with them by writing
  13.     their names in orange (or whatever you have set color 3 to be), unless
  14.     you use the -M option (for Monochrome).  Any *.info file that is not
  15.     associated with a regular file or directory is shown normally, e.g.
  16.     Disk.info.  You can see all *.info files normally with the -I option.
  17.  
  18.   + It is fully reentrant and reexecutable.  The "pure" bit is set; you can
  19.     make it resident.
  20.  
  21.   + It is faster than other directory listers.  If you install the included
  22.     fastscan.library in your LIBS: directory, Dr (or any other program
  23.     written to use the library) can sometimes be many times as fast as Dir at
  24.     scanning floppies; other allegedly "fast" listers are all slower than Dr,
  25.     and are often less reliable besides.  Under the Fast File System, there
  26.     is much less difference, but Dr still has an edge.  Dr still works if the
  27.     library is not present, but with a much smaller speed advantage.
  28.  
  29.   + It arranges the output in a variable number of columns, with spacing
  30.     based on both the length of the longest filenames and the width of the
  31.     window.  It assumes a width of 77 when output is not going to a CON:
  32.     window.  By default, it sorts the entries in columns, not in rows; it's
  33.     easier to find things alphabetically that way (try it out if you don't
  34.     think so).  The -H option makes it sort in rows.  Directories are listed
  35.     before files, with slash characters after their names.
  36.  
  37.   + It handles AmigaDOS wildcard patterns, like "#?.(c|o)" to list all files
  38.     with names ending in ".c" or ".o".  Those of you who hate "#?" can use
  39.     "*" instead -- under dos 1.x Dr translates "*" to "#?", but under 2.x you
  40.     must activate the AmigaDOS WILDSTAR flag to do this; the NathanHale
  41.     program included with Dr (it's tiny, pure, and PD) switches this feature
  42.     on or off for all regular AmigaDOS programs, as well as Dr.  Under
  43.     AmigaDOS 1.3 and older, you can also show all files that do NOT fit a
  44.     pattern by putting a "~" at the beginning of it; for instance
  45.     "dr foo/~#?.o" shows all files in directory foo that do not end with ".o"
  46.     -- a "~" in the middle of a pattern has no special meaning, under 1.x.
  47.     Under dos 2.04 and newer, Dr uses the full new pattern syntax including
  48.     tildes and square brackets (character classes); to negate an entire
  49.     pattern, you must use "~(pattern)".
  50.  
  51.   + It understands dos 2.x file links.  When the -L option is used, it shows
  52.     what each soft link is linked to, in an extra line after the regular
  53.     information for that file.  Using the -X option on a soft link tells the
  54.     pathname that it is linked to, but no other information (this is due to a
  55.     limitation of AmigaDOS).  In normal output, soft links are grouped with
  56.     directories but do not have slashes on the ends of their names as
  57.     directories do.  Hard links do not at present get any special treatment,
  58.     except that Dr will notice if a directory is linked "inside itself".
  59.     (Note that if you list a directory containing a hard link, you will not
  60.     see any filenote on it, but if you ask for a listing of just that link
  61.     (with the -X option if it is a directory), you may see one.  This is the
  62.     filesystem's fault, not Dr's.)
  63.  
  64.   + It has lots of genuinely useful options.  There isn't much one could ask
  65.     of a directory lister that Dr can't somehow accomplish.
  66.  
  67.   + And last but certainly not least, Dr is public domain and the source
  68.     code is provided both for Dr and for fastscan.library, which is copyright
  69.     © 1992 by Paul Kienitz but freely distributable if not modified.  CREDIT:
  70.     the pattern matching code for dos 1.3 and older is PatMatch by Jeff
  71.     Lydiatt, available on Fish disk 85, modified to be reentrant.
  72.  
  73. USAGE:  type "Dr" followed by zero or more file names, directory names,
  74. patterns, or options, or type "Dr ?" for a summary of options.  Anything that
  75. starts with a dash character and is not enclosed in quotes is taken as
  76. options.  Example:
  77.  
  78.   dr -orf devs:
  79.  
  80. In this command, "devs:" is the directory that gets listed, and the set of
  81. options is "-orf".
  82.  
  83. By default, Dr lists the names of files and subdirectories in whatever
  84. directories you tell it to list, alphabetically sorted in columns.  It's
  85. usually easier to find something alphabetically by reading down columns
  86. instead of across rows, in my experience.  If you disagree, use the -H option
  87. (H for "horizontal").  Directory names are listed before file names, with the
  88. filenames indented one space.  (This method of visibly separating them
  89. replaces that stupid line of dashes that many users disliked.)  Each
  90. directory name is followed by a slash.  Only the name itself, not the slash,
  91. is orange if it has an icon.  Things with associated *.info files will be
  92. marked as such even if the *.info file itself is excluded by the pattern you
  93. used, or by the -D or -A or -B options.  If you list just a single file, it
  94. will check whether it has a *.info file and show the name in the alternate
  95. color if so, unless you use the -I (show .infos) or -M (monochrome) option.
  96. It does not check to see whether files with names ending in .info are actual
  97. valid icon files.  Note that if the output is not a CON: window, it is as if
  98. -M were used; it doesn't show you which files had icons.
  99.  
  100. Pattern wildcard characters are currently only recognized at the end of a
  101. pathname you give to dr (that is, after the last slash or colon if any); e.g.
  102. you can't yet go "Dr */src/*.c" to find all .c files in all subdirectories
  103. named src.  This ability will be added someday.  If anybody cares.
  104.  
  105. New in release 1.5 is an extension of pattern syntax (besides a "~" at the
  106. beginning to negate it, under 1.x):  If you end the pattern with a double
  107. colon, it applies that pattern to files within all subdirectories it
  108. encounters, as well as the directory you specify.  Think of "pattern::" as
  109. being equivalent to "pattern" and "#?/pattern" and "#?/#?/pattern" and so on.
  110. This is different from using the -R option (show contents of subdirectories)
  111. with a pattern.  With -R, it shows files in the top directory that fit the
  112. pattern, and looks in each subdirectory with a name that fits the pattern,
  113. showing all the files inside.  With "::" it looks in all subdirectories and
  114. shows the items in them that match the pattern.  The "::" can be used only at
  115. the very end of a path/pattern specification.  Hopefully someday it will also
  116. be usable in the middle, before a slash.
  117.  
  118. -R will also search the contents of directories which are not shown, if the
  119. reason they are not shown is because of the -A, -B, -F, or -P options, rather
  120. than because of a pattern.  Those options will limit which files are shown
  121. within those subdirectories.
  122.  
  123. If an actual directory has a name with pattern characters in it, like maybe a
  124. drawer named "Doesn't work?", Dr will list that directory instead of
  125. expanding the pattern.  You can force it to expand by adding an extra percent
  126. sign to the pattern, so it doesn't match the name.  Patterns may be up to 128
  127. characters long, not counting the directory path in front of it (but a "*"
  128. counts for two characters under dos 1.x).
  129.  
  130. If you wish to use a single question mark as a pattern to show all files with
  131. one-character names, and there are no other arguments on the command line,
  132. you must put quotes around it or add a percent-sign to it, or Dr will think
  133. you are asking it for a brief summary of usage and options.  As of Dr 1.5,
  134. the way to specify a quote within quotes is with "" rather than the BCPL-
  135. style *", in order to make it easier to use the asterisk as a wildcard.
  136.  
  137. You can give several option letters after one dash, like "Dr -chs foo", or
  138. separately, like "Dr -c -h foo -s".  The case of the option letters doesn't
  139. matter.  Each option affects those files and directories that come after it
  140. on the command line, except that any options at the end, after the last
  141. filename, act as if they were entered at the beginning.  Example:  "dr foo -s
  142. bar" lists directory foo without showing sizes, and directory bar with sizes
  143. shown.  If a directory name begins with a dash, put quotes around so that it
  144. isn't taken as options.  If you give an option twice, the second one cancels
  145. the first.  This means that if you make an alias like "alias list dr -lc []",
  146. saying "list -c" turns the -c option off.  Or, you can show directory foo
  147. with sizes, and directory arf without sizes, with the command "Dr -s foo -s
  148. arf".  (Note: since options at the end act like they are at the beginning,
  149. "Dr -s directory -s" will show the directory without the -s option!)
  150.  
  151. The complete set of options for Dr release 1.5b is:
  152.  
  153.     -I  List .info files like normal files instead of using an alternate
  154.         color to mark the other files they are associated with.
  155.  
  156.     -M  Turns off the use of color to mark files that have icons.
  157.  
  158.     -S  Show the size of each file in bytes, and totals.
  159.  
  160.     -C  Sort chronologically (newest last) instead of alphabetically.
  161.  
  162.     -Z  Sort by file size, from smallest to largest; items of the same size
  163.         are sorted alphabetically or chronologically depending on presence
  164.         of -C.
  165.     
  166.     -V  Sort in reverse (Z to A, newest to oldest, or largest to smallest).
  167.  
  168.     -H  Sort into rows instead of columns, if more than one column.
  169.  
  170.     -L  Show sizes, protection bits, datestamps and filenotes like the List
  171.         command.  Overrides -S.  Show total bytes/blocks used.  Unlike List,
  172.         it puts the filename after the other information instead of before.
  173.         For soft links it adds an extra line telling what path it is linked
  174.         to.  Output is sorted unless you also use the -O option.
  175.  
  176.     -R  Recursively show contents of all subdirectories found.  If you're
  177.         going to descend a whole lot of levels (like more than about nine)
  178.         you might need a bigger stack than the default 4K.  It checks for
  179.         adequate stack before entering each subdirectory.  An 8K stack would
  180.         let you go about 40 levels deep.
  181.  
  182.     -U  Show only disk space consumed, and a count of files and directories,
  183.         without listing any names unless you also use -O or custom
  184.     formatting.  As far as output goes, -U overrides all other options
  185.     except -R, -O, and custom formatting, but patterns and options may
  186.         affect the totals shown.
  187.  
  188.     -O  Put each filename on a separate line as a complete pathname, do not
  189.         sort or hide .info files, and when -R is used merge all the
  190.         directories and subdirectories into a single list.  If -L is also
  191.         used, size and protection and such is shown, and totals are given at
  192.         the end, with no subtotals for inner directories.  Names in this case
  193.         are shown as relative pathnames from the directory specified,
  194.         including inner dir names if -R is used, not as complete pathnames.
  195.         Using -U with -O also causes totals to be shown at the end, but
  196.         leaves the output in the form of one complete name per line.  If
  197.         neither -L nor -U is used, there are no headers to separate
  198.         directories, just nothing but names.  This can be very useful as
  199.         input to other programs.  Overrides -S, -K, -C, and lack of -I.  The
  200.         beginning of the pathname shown is the directory arg as you specified
  201.         it in the command, not the absolute path.  The pathnames output have
  202.         a maximum length of 300 characters.  Output is continuous while the
  203.         disk is being scanned, instead of done afterwards.  Unsorted output
  204.         can be noticeably faster if you are using fastscan.library, because
  205.         the disk IO is asynchronous.
  206.  
  207.     -D  Do not show file names, only subdirectory names.  Cancels -F.
  208.  
  209.     -F  Do not show subdirectory names, only file names.  Cancels -D.
  210.  
  211.     -K  Show the disk address (header block key) of each file or directory, in
  212.         square brackets.
  213.  
  214.     -X  Show the protection bits, datestamp, and filenote of the directories
  215.         you specify, instead of showing the files inside.  If an arg is a
  216.         soft link instead of a directory, show the pathname that it is linked
  217.         to.  Ignored if -R or a pattern is used.  Overrides -F -D -P and -O.
  218.  
  219.     -A# (example: -A30)  Show all files dated within the last # days.  The
  220.         cutoff point is midnight before the day # days ago.  Thus -A0 shows
  221.         files changed today.  -A not followed by a digit cancels.
  222.  
  223.     -B# (example: -B5)  Like -A, but show all files more than # days old.
  224.         Combining -A with -B uses a range of days, or excludes a range of
  225.         days if the -A number is smaller (more recent) than the -B number.
  226.  
  227.     -P  A bit more complicated than the options above; the letter P may have
  228.         other letters after it, each one optionally preceded by a tilde (~).
  229.         The letters allowed are H, S, P, A, R, W, E, or D (lowercase okay).
  230.         These letters represent protection bits.  If the tilde is in front of
  231.         a letter, Dr will show only files for which that protection bit is
  232.         not set.  If there is no tilde it will show only those for which it
  233.         is set.  For instance, to show all "pure" files, use -PP.  To show
  234.         all script files which have not been backed up, use -PS~A.  Use -P
  235.         with a space after it to cancel earlier -P options, making it ignore
  236.         protection bits.  For the bits R, W, E, and D, "set" means that the
  237.         bit shows as present when you use List or Dr -L.  (The physical bit
  238.         is actually a zero in these cases.)  So for example -P~D means show
  239.         files protected from deletion.  You can use a caret (^) instead of a
  240.         tilde (~) if you want.  Must not be followed by another option
  241.         letter; that is, you can't use -PAU for -PA -U.
  242.  
  243.     -[...format string...]
  244.         Control the format of the output.  For each file or directory to be
  245.         listed, the text inside the brackets is written out followed by a
  246.         newline.  Substitutions are made on that text as follows:
  247.            \n is replaced with a newline.
  248.            \e is replaced with an escape character.
  249.            \d is replaced with the name of the directory being searched.
  250.                (If you specified a file instead of a dir, or used -X, \d will
  251.                give the full name, and any filename added after it will be
  252.                invalid.)
  253.            \f is replaced with the name of the current file or directory
  254.                being listed, with no path in front.
  255.            \p is replaced with the pathname of the current file or directory
  256.                -- like \d followed by \f, with a slash in between if needed.
  257.            \? becomes a slash if the current file is a directory, or a colon
  258.                if it is a volume (with -X option), or nothing for files.
  259.                Usually used right after \f or \p to show whether it is a
  260.                directory.
  261.            \/ is a slash unless the preceding character output was a slash,
  262.                colon, double-quote, whitespace, or control character.
  263.                Possibly useful for joining filenames onto directory names.
  264.            \b is replaced with the file's protection bits, shown as eight
  265.                letters or dashes; e.g. "-s-arw-d".
  266.            \t is replaced with the file's timestamp, in the format
  267.                DD-Mmm-YY HH:MM:SS.  No choice of date format yet.
  268.            \s is replaced with the file's size in bytes, padded to a constant
  269.                width (no field width choice yet), or blanks for a directory.
  270.            \k is replaced with the disk address (key) of the file or
  271.                directory, padded to a constant width.  For both this and \s,
  272.                the amount of space used is that needed by the largest number
  273.                in the output, or a fixed value if the output is unsorted.  In
  274.                short, don't assume a constant value.
  275.            \i is replaced by (n) spaces, where (n) is how many levels deep in
  276.                recursive descent you are -- no spaces when no recursion.  Use
  277.                a few \i's before the filename to get indentation
  278.                corresponding to the nesting of subdirectories.
  279.            \+ prevents the newline at the end of each output.
  280.            \ before anything else "quotes" it.  Use \\ for \ and \] for ].
  281.         The options \b, \t, \k, \s, \e, \i, and \? are new in release 1.5 of
  282.         Dr.  To cancel a previous format option and use normal output, use
  283.         -[].  Overrides -S, -L, and -K.  Output is sorted normally, and has
  284.         the usual headers to separate subdirectories and separate command
  285.         line argument directories unless you use -O also.  Note that
  286.         whitespace and double-quotes inside -[...] are treated like any other
  287.         characters, not as marking separate arguments to Dr.  The result that
  288.         is output after substitutions is limited to 255 characters.  The name
  289.         written by \p or \f will be in the cursor color (orange or whatever)
  290.         if it has an icon, unless you use -I or -M or -O or send the output
  291.         to a file.
  292.  
  293.     -{... format string...}
  294.         Like -[...], except it executes the result as an AmigaDOS command
  295.         instead of just writing it out.  (\} means } in this case.)  This is
  296.         done in addition to, not instead of, normal output.  So you can use
  297.         both -[...] and -{...} at once with different formats.  The command
  298.         is done first, the output last; commands are executed during the disk
  299.         scan instead of saved until afterwards, so they are done in unsorted
  300.         order.  You can use -[\+] to suppress all output and just run
  301.         commands.
  302.  
  303.     -!  Turn off the cursor during output to the screen.  This makes it go
  304.         faster.  This option has no real purpose except for speed
  305.         competitions with other directory lister programs which also use this
  306.         trick.  Unlike other options, a -! anywhere in the command line takes
  307.         effect throughout the whole program run.
  308.  
  309. If Dr lists the contents of more than one directory, each one will be
  310. preceded with its name, written like this:
  311.  
  312.         ===  path/whatever/dir  ===
  313.  
  314. unless you use -O (but not -U or custom formatting) in which case the
  315. different listings will all run together without separation.  If you give no
  316. directory or pattern, it lists the current directory, of course.  Or you can
  317. specify the current directory as empty quotes: "".
  318.  
  319. The usage totals given at the end of a -S, -L, or -U output tell the number
  320. of directories listed, the number of files, the total number of bytes in the
  321. files, and the number of disk blocks they occupy.  For each of these numbers
  322. it may give a second number in parentheses.  This represents the total found
  323. in the whole directory, when it differs from the total of those selected for
  324. listing.  Things excluded by a pattern or by -A, -B, -D, -F, or lack of -I,
  325. may contribute to the differences between the numbers.  Note that when you
  326. use fastscan.library it does not actually count all the blocks in each file,
  327. it just estimates the number of blocks from the file's length.  This is to
  328. avoid unnecessary disk access to read file extension blocks.  There are
  329. occasionally files that are bigger than they look; fake files made to contain
  330. bad tracks are often like this, having a length of zero yet containing a
  331. track's worth of blocks.  The next release of fastscan.library may address
  332. this shortcoming, but until then Dr with fastscan.library will show incorrect
  333. information in these cases.
  334.  
  335. Some examples of using format strings:  to mark the files in directory foo as
  336. having been last updated yesterday, use
  337.  
  338.     Dr -o -{setdate "\p" yesterday} foo
  339.  
  340. The -o is not necessary but usually a good idea.  Or you might want to use
  341. -[\+] to suppress output.
  342.  
  343. To copy all files ending in ".c" in directory foo to directory bar with
  344. ".BAK" stuck on the end (foo/xxxxx.c becomes bar/xxxxx.c.BAK), use
  345.  
  346.     Dr -o -{Copy "\p" to "bar/\f.BAK"} foo/#?.c
  347.  
  348. WARNING:  Using Rename in the -{...} command may not work.  With at least
  349. some versions of the file system, such as the AmigaDOS 1.3 Ram-Handler,
  350. renaming a file, and then looking up the "next" file in that directory after
  351. the one that just got moved, gets it very confused.  Better to use -[] to
  352. write the Rename commands to a temporary file and then Execute that file.
  353. Similar cautions apply to Delete.
  354.  
  355. Some Un#@%!x folks like to list their files by simply going "echo *".  This
  356. writes out the names of the files packed all onto one line.  Well if you want
  357. to misuse Dr that way, you can:  (you'll probably want to use an alias)
  358.  
  359.     Dr -f -[\f \+] foo
  360.  
  361. That could be shortened to "Dr -f[\f \+] foo" ... with Dr 1.5, unlike 1.3,
  362. you can put letter options after the same dash as [] and {} options, before
  363. or after the brackets.  Dr will output a newline before it exits.
  364.  
  365. You can execute more than one command for each file by putting \n in between
  366. the commands inside -{ }.  Or alternatively, you can split the Dr command
  367. into multiple lines with a plus sign at the end of all but the last, and the
  368. newlines will be included in the bracketed command string.  (Plus-newline
  369. outside of brackets is considered the same as a space.)  But the complete
  370. text after all substitutions are made must be less than 256 characters long
  371. or Dr cannot execute it.  If a command comes out too long, Dr will write out
  372. a warning message and continue, and return 5 ("Warn") when it exits.
  373.  
  374. As an example of using more than one command separated by newlines, the
  375. following will type out all the files in directory foo with a header in front
  376. of each one:
  377.  
  378.     Dr -[\+] -{echo "*N  #### FILE \p -=>" \n type "\p"} foo
  379.  
  380. Or, alternatively:
  381.  
  382.     Dr -[\+]{echo "*N  #### FILE \p -=>" +
  383.     type "\p"} foo
  384.  
  385. Under AmigaDOS 1.3 and older, if a command returns a DOS error code Dr will
  386. stop, returning 10 ("Error"), and Dr's DOS error code will be that set by the
  387. failing command.  Some programs never set a DOS error code (e.g. 205 =
  388. "object not found") but indicate failure purely by their return value (e.g. 5
  389. = WARN, 10 = ERROR).  But Dr cannot tell what the return value is under 1.x,
  390. only the dos error code.  This is because it uses the DOS Execute() function.
  391. Under 2.04 or newer, on the other hand, It uses System() instead of Execute()
  392. and is able to tell what the return code is.  At present, it quits whenever
  393. the return code is not zero.  A future version will have some way of setting
  394. a "Failat" level for such commands.
  395.  
  396. To work around this limitation under 1.3, I am including a tiny program
  397. called R2E, which returns as its error code the value which the previous
  398. program gave as its return value.  You would use it by adding "\n r2e" to the
  399. end of your -{...} format command.  For instance, the RX program for running
  400. rexx scripts never sets a dos error code.  You would use R2E on it like this:
  401. Dr -{rx whatever \n r2e} foo.  Then if RX returned nonzero, R2E would cause
  402. Dr to stop at that point.  UNLESS the return from RX was higher than the
  403. FailAt level (default 10), in which case R2E won't be executed at all because
  404. the command-executer quits when it gets a return value that high ... so in
  405. practice you have to use a FailAt command.  For example
  406. -{failat 999 \n rx whatever \n r2e}.
  407.  
  408. Another example; your command is "type \p", and you want Dr to stop if you
  409. interrupt Type with a control-C, you would use Dr -{type "\p" \n r2e} foo,
  410. because when Type is control-C'ed it returns 5 but no error code.  For
  411. programs which don't react to control-C at all ... if you want to stop Dr,
  412. just keep banging control-C and sooner or later the signal will be heard by
  413. Dr instead of by the program being run.  Or try control-D which also works to
  414. stop Dr.
  415.  
  416. To make the -{...} option work most efficiently under 1.3 and older, there
  417. are certain steps you should take.  Make C:Run resident, and if you are using
  418. AmigaDOS 1.3, make sure you are using version 1.3.2 or later of SetPatch, not
  419. the older 1.3 ... if you have any older version of AmigaDOS, get 1.3.2 or
  420. 1.3.3!  Otherwise any program that uses the Execute function will reload
  421. C:Run from disk every time it's called.  Do this even if you don't use
  422. AmigaShell and don't make anything else resident.  But it helps if you DO use
  423. AmigaShell (make L:ShellSeg resident as "CLI") and make resident if possible
  424. whatever commands you are executing with Dr.  Under 2.0 you only have to
  425. consider making resident the commands you actually use in -{ }.  Make R2E
  426. resident if you ever use it at all; it takes up extremely little space.  If
  427. you can't make the programs you're running resident, you can copy them into
  428. ramdisk and run them from there.  When the same program is being run over and
  429. over, once for each file, running it from disk each time is very wasteful.  A
  430. hack called Rez 0.5 by Jim Goodnow II is very useful for effectively making
  431. non-pure programs resident.
  432.  
  433. You can put a number after R2E to give it a "fail level".  Return values
  434. below this number from the previous program will be returned as zero.  Like,
  435. "R2E 10" will report no error if the previous program returns 5, but will if
  436. it returns 10.  The default "fail level" is 1.  If it is a rexx command in
  437. particular that you want to execute, you might want to try using my FRX
  438. command instead of RX, if you can find a copy.  It doesn't need R2E.  FRX
  439. also lets you set up command line templates for your rexx scripts.
  440.  
  441. Neat trick:  With Dr you can turn Lharc into a hard disk backup utility!
  442.  
  443.     Dr > Tempfile -orfp~a -{protect "\p" +a} Disk:
  444.  
  445. This will write a list of all the files in Disk: that have been altered since
  446. the last backup into Tempfile, and simultaneously mark all those files as
  447. archived.  (To be safest it would be better to not mark them until after the
  448. backup is done ... maybe someday I'll write a "backup-one-file" program to be
  449. used with Dr.)  Then give the command
  450.  
  451.     Lharc -x -iTempfile a Vol:ArchiveName
  452.  
  453. and it will archive all the files named in Tempfile into Vol:ArchiveName.LZH.
  454. You can use a pattern to not back up certain files, using the tilde and
  455. double-colon features.  For instance, to avoid backing up files with names
  456. ending in .o or .bak, the above Dr command might be rewritten like this:
  457.  
  458.     Dr > Tempfile -orfp~a -{protect "\p" +a} Disk:~(#?.(o|bak))::
  459.  
  460.  
  461. The following are features that you can probably expect in Dr 1.6:
  462.  
  463.     Completely separate versions for 1.x and 2.x AmigaDOS, each one smaller.
  464.  
  465.     Optional conversion of pathnames entered on the command line into
  466.     absolute paths (e.g. "dr -o libs:" writes "Workbench2.0:libs/asl.library"
  467.     instead of "libs:asl.library", etc).
  468.     
  469.     Default options read from an environment variable or local shell
  470.     variable, and special style options suited for being put there.  These
  471.     would let you choose stuff like:
  472.         - whether to show directory names before filenames, or after, or mix
  473.             them together
  474.         - whether to show inner directory contents before or after outer ones
  475.         - how to separate directory names -- blank line, line of dashes,
  476.             differing indentation, use of color, or a combination maybe
  477.         - whether to use names like "Yesterday" or "Wednesday" in reporting
  478.             datestamps 
  479.         - what format to write dates in (e.g. MM/DD/YY or DD-Mmm-YY or ...)
  480.         - whether to pursue soft links when using -R
  481.  
  482.     The ability for the \f and \p formatting options to perform string
  483.     substitution on filenames, so that (for instance) FOO.TXT becomes
  484.     FOO.DOC.  This would be expressed with a syntax like "\:.txt/:.doc:p".
  485.     (The slash after ".txt" would indicate that it must be found at the end
  486.     of the name.)  And more ways to split and combine the starting pathname
  487.     as given, the absolute pathname of that, the subdirectory under that, and
  488.     the local name.
  489.  
  490. Other features I might add eventually:
  491.  
  492.     -G:  Show file's timestamp as age; days and hh:mm:ss before present.
  493.  
  494.     Handle patterns in the middles of paths, like foo/#?/src/#?.c
  495.  
  496.     Make -A and -B able to parse date-and-time ... Well, under dos 2.x maybe.
  497.  
  498.     -Q:  Super-compact columnation like ls 4.1ljr, maybe.
  499.  
  500.     Make -X and -R both work at once.
  501.  
  502.     Some way to handle filenotes and days-of-the-week and "Today" and
  503.     "Yesterday" in custom formatting maybe.
  504.  
  505. The Amiga is now the fourth system I have written a directory lister for.
  506. First was TOPS-20 (one that showed only files that you are the owner of),
  507. next Kaypro II (fast, 2K long, sorted, showed size), third 4.2 BSD Un*#%$!x
  508. (like ls -ls but faster because don't look up group names, just indicate
  509. whether your group).  So this one is, like, the crowning achievement of a
  510. great career in directory lister writing.  There is now almost no use at all
  511. for any other lister, except maybe if you actually find Dir's interactive
  512. mode to be of any use.  My original goal was just to produce an adequate
  513. alternative that left out .info files; my goal now is for Dr to be the best
  514. available.
  515.  
  516. Dr is in the public domain, written by Paul Kienitz.  Fastscan.library is
  517. Copyright © 1992 by Paul Kienitz, and is freely distributable in unmodified
  518. form provided that this copyright notice is visibly included.  Feature
  519. suggestions and bug reports are appreciated.  I can be reached at:
  520.  
  521.        snail: Paul Kienitz             bbses: try                  
  522.               6430 San Pablo ave.        Winners Circle 510-845-4812 
  523.               Oakland, CA  94608         FAUG           415-595-2479 
  524.               USA                      net: paulk@terapin.com
  525.  
  526. If you want the source and didn't get it with the executable, you should be
  527. able to download it from one of those bbses.
  528.  
  529.