
Program HUNT - J R Stockton, jrs@merlyn.demon.co.uk, >= 2001-12-09

HUNT is a variation on DOS 3.3's DIR, with many enhancements (some of
which appear in the DIR of later DOS).

The authentic documentation is that at the beginning of HUNT.PAS, from
which the following is derived.

HUNT was written, starting in 1988/89, primarily for my own use.  Updates
are put on the Web in my http://www.merlyn.demon.co.uk/programs/hunt.zip ;
see also my http://www.merlyn.demon.co.uk/programs/00index.htm ; there is
a copy at ftp://garbo.uwasa.fi/pc/turbopas/hunt.zip , but less frequently
changed.

HUNT does not recognise Long File Names.



This program is used at your own risk; RSVP.

Beginnings of output lines are chosen for | SORT


  HUNT scans directories, subdirectories, and allows commands on its findings.
  Any effects of DOS's APPEND ASSIGN JOIN SUBST have not been considered.
  With no parameters, '*.*' is used, else '.*' or '*.*' is appended as needed.
  The first parameter defines a set of files to list, cf DIR, incl wildcards.
  Subsequent parameters - '-' or '/' is ignored if starting a parameter and
  case is ignored - may include one or two strings, S1 S2, each bounded by '"';
  if so, for each file found the string 'S1 <filename.ext> S2' is offered
  for COMMAND.COM (Unconditionally if any parameter starts 'U') [if "S1"="",
  MSDOS will (ignoring <.ext>) try to execute '<filename>.COM/EXE/BAT S2']
  (if 'S1...S2' changes the list of files, caution!); 'T' means '"TYPE"';
  at offer, reply with first character of: Yes (to do), No (to not do),
  Unconditionally (to do all the rest), Quit (to offer no more) or Skip
  (to skip the rest of the files in this directory).  HUNT /? gives HELP.
  Others -
  A = filename first (for Alphabetical |SORT)
  B = Before/= date-time - as B89/11/27-19:55:46 or B#19:55:46 - can truncate
  C = offer subdirectory containing file/dir found; if yes, ChDir & exit
  D = Directories only are to be found
  E = Endless; B & F dates, and summary, will not be shown
  F = From date-time - as F89/11/27-19:55:02 or F#19:55:02 - can truncate
  I$ = Ibid - insert $+directory where file found just before string S2
  J$ = Jbid - insert $+directory where file found just after string S2
  L = scan subdirs Later than files, rather than before files
  N = New (current date) files only
  O = Only put filenames on Standard Output (new 29+/11/90)
  P = put Path from CurrDir at end of line (if no ") - useful with S|sort
  Q = Quieter - omit * lines
  R = Rootwards directories also, no PATH search
  S = Subdirectory contents also, no PATH search
  T = "TYPE"
  U = Unconditionally
  X = COM, EXE, BAT extensions; with P, searches PATH using GetEnv
  Y = from Yesterday (F#-1)
  Z## = only shows files of siZe >= +## or <= -##; sign required
  ~*~ = character * replaces " above henceforth in line
  + = put no space after S1 or before S2 (changed 26/01/90)
  2,4 = force 2 or 4 digit years (from 1998/01/02)
  *, \ are ignored (& can thus default for first parameter in *.BAT)

  HUNT FRED x p should show all files FRED might now execute, in order;
  HUNT \ x s should show all executable files.  HUNT mostly uses Std_Out.

  It can be useful to pipe the output through FIND "/" &/or SLOW &/or SHOWER.
  Try HUNT * s p q "fc" id: "*.*"
  Other operations can be done by invoking a suitable ad hoc batch file
   (e.g. HUNT * S "compare c: d:" where DIFF.BAT contains FC %1%3 %2%3).
  Now reorganised to pipe better with ".." & queries.  HUNT /? also helps.

  Consider B:?\?>HUNT * "hunt a:" + " s ~#~ #copy# #b:#"
   & B:?\?>HUNT HUNT.* ~'~ 'FIND /I "find"' u !

  Viral infection &c test : a ? precedes names containing sinful characters :
   try ?:?\?>HUNT \ s p q | find "?"

  With B & F, if the next char is "#", it represents TODAY, next is time;
   if "-" follows "#", the "days-before" number follows, followed by time;
   the default epoch fields represent 2000/00/00-00:00:00.  No <1980 check!

  1994/09/14 : Keyboard response was Readln(Para), is Para := ReadKey
  1994/09/29 : if later in line, N supersedes F|B and vice versa
  1995/02/02 : after F|B, today is # (was =)
  Note : within actual "..", > >> < | are preserved for the S1 command.
  1996/07/08 : OK with (does not show) W95 long file name entries.
  1997/12/15 : made Year 2044 compliant.
  1998/01/04 : Options 2 & 4 - force #YearDigits.
  1998/02/03 : Crt removed, ReadChar replaces ReadKey.
  1998/07/20 : Option D- - no directories shown.
  1999/01/24 : Option C changed ?  if D, change to dir found.
  1999/03/20 : "?" repositioned for Option A; <Bee4 now <=Bee4.
  1999/04/24 : Option f## (& b##); #=today, ##=now.
  2000/09/17 : Recurses deeper in trees.
  2001/04/09 : Extra space before b & f, for SORT.
  2001/07/10 : Dots in HUNT * s o more consistent.  ? into (y/n/U/Q/S/?).
  2001/10/17 : HUNT * x p o fixed
  2001/12/08 : ID line only in Help.  Option e, Endless, omit top & tail.
  2001/12/09 : Option Z##, default 0, only files size>=##, final - for <.


            http://www.merlyn.demon.co.uk/programs/hunt.txt

                            ------------

