home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19174 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  3.4 KB

  1. Path: sparky!uunet!wupost!spool.mu.edu!think.com!ames!saimiri.primate.wisc.edu!copper!mercury.cair.du.edu!mnemosyne.cs.du.edu!arrakis!
  2. From: @arrakis.denver.co.us (Bob Hood)
  3. Newsgroups: comp.lang.c
  4. Subject: Directory search function needed
  5. Message-ID: <726078277snx@arrakis.denver.co.us>
  6. Date: 4 Jan 93 08:55:58 GMT
  7. References: <8829@orbit.cts.com>
  8. Reply-To: thor@arrakis.denver.co.us
  9. Organization: Bob's Programming Paradise
  10. Lines: 65
  11.  
  12. In article <8829@orbit.cts.com> ceg@pnet51.orb.mn.org writes:
  13. >
  14. > Does anyone out there have a function that will search DOS directories
  15. > for a specific file (or a wildcard x*.* of files)?  Thanks!
  16. >
  17.  
  18. I have a utility that I wrote for myself called "Locate File", or LF for short.
  19. This utility is a power-user's WHEREIS.  Here's the help screen from it:
  20.  
  21.     Locate File 1.93  ~  Copyright (C) 1992 Bob Hood
  22.  
  23.     Usage: LF [option [option]...] <filespec1> [<filespec2>...<filespec10>]
  24.     where [option] is one or more of the following:
  25.     -q      quite mode: only located files are printed w/ full path
  26.     -l      look mode: scans located binary/ascii files for text
  27.                 filespec1 is the text to search for
  28.                 filespec2-10 are normal file specifications
  29.     -r[d]       restricts search to current partition
  30.                 'd' current directory and subdirectories
  31.     -k[vudf]    kills every matched file
  32.                 'v' verify kills
  33.                 'u' make deleted files unrecoverable
  34.                 'd' remove empty directories
  35.                 'f' forcibly removes files (READONLY)
  36.     -c<command> applies <command> to every file located
  37.                 (see LF.DOC for details and examples of usage)
  38.     -d[XX]99/99/99  specifies a date to match, where XX is one of:
  39.                  +  after <date>
  40.                  -  before <date>
  41.                 +=  after or equal to <date>
  42.                 -=  before or equal to <date>
  43.     -t[XX]99:99 specifies a time to match, where XX is one of:
  44.                  +  after <time>
  45.                  -  before <time>
  46.                 +=  after or equal to <time>
  47.                 -=  before or equal to <time>
  48.     -a[RHSVAD]  display attributes of located files, or locate files
  49.             with one or more of these attributes:
  50.                 'R' read-only
  51.                 'H' hidden
  52.                 'S' system
  53.                 'V' volume label
  54.                 'A' archive
  55.                 'D' directory
  56.     -p      restrict search to the currently defined PATH variable
  57.     <filespec>  any valid DOS filename specification (unless otherwise noted)
  58.  
  59.  
  60. This utility will, by default, search multiple partitions, unlike Norton's FF.
  61.  
  62. Since the source is over 1,000 lines of code, I will email to anyone who 
  63. wishes a copy a uuencoded archive containing the source code, MS-DOS 
  64. executable, and the DOC file for the utility. Please indicate the archive 
  65. format you would like (ARJ, ZIP, LZH, ZOO, etc.).
  66.  
  67. Please Note:  I have not before released the source code to this program.  
  68. Although it is copyrighted, I will release it for free and unrestricted 
  69. personal use.  Also, since I wrote this utility for myself, and since you will 
  70. have the source in your hot little hands, please keep any requests for support 
  71. to a minimum.
  72.  
  73. Bob
  74. ---
  75. Bob Hood   thor@arrakis.denver.co.us      H: 303-986-7127   W: 303-623-2180
  76. -----------------------------------------------------------------------------
  77.                   I'm not an expert, but I play one at work....
  78.