home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / misc / 4078 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  3.0 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!enterpoop.mit.edu!eff!news.byu.edu!news.mtholyoke.edu!nic.umass.edu!hamp.hampshire.edu!kudut
  2. From: kudut@hamp.hampshire.edu
  3. Newsgroups: comp.lang.misc
  4. Subject: SEARCH.BAT - BBS file listings searcher.
  5. Message-ID: <1992Dec30.234158.1@hamp.hampshire.edu>
  6. Date: 31 Dec 92 03:41:58 GMT
  7. Sender: usenet@nic.umass.edu (USENET News System)
  8. Organization: Hampshire College
  9. Lines: 68
  10.  
  11. @echo off
  12. REM MS-DOS ignores all lines with REM in front of them.  Please keep them
  13. REM in this batch file, though, as you or someone else might need to
  14. REM reference to this in the future.  Kenneth Udut, on 12/28/1992
  15. REM
  16. REM Necessary files: GREP or similar file that searches through text files.
  17. REM The -i parameter means to ignore case (upper or lower).
  18. REM MS-DOS's "FIND" command will work for files under 64K in length.
  19. REM
  20. REM LIST.  You can use TYPE D:\SEARCH\RESULTS\%1 | MORE  if you wish or
  21. REM some other text file viewing program, even Wordperfect :-)
  22. REM
  23.  
  24. REM checks if user typed in anything.  If not, go to JAIL.
  25. if "%1" == "" GOTO JAIL
  26.  
  27. REM Glory lines, as well as useful info about what the user is doing.
  28. echo _________________________________________________________________________
  29. echo.
  30. echo Simple ASCII Information Extractor Version 1.32, Kenneth Udut  12/29/1992
  31. echo.
  32. ECHO You are searching through all of the text files in D:\SEARCH for "%1".
  33. echo The results of this search will be placed in D:\SEARCH\RESULTS\%1.
  34. echo _________________________________________________________________________
  35. echo.
  36. echo Searching for "%1" in D:\SEARCH\*.* ...  Please be patient.
  37. echo.
  38.  
  39. REM Places Date and Time plus a blank line in %1.
  40. echo. | more | date | find "Cur" > D:\SEARCH\RESULTS\%1
  41. echo. | more | time | find "Cur" >> D:\SEARCH\RESULTS\%1
  42. echo. >> D:\SEARCH\RESULTS\%1
  43.  
  44. REM You can see what's going on with ECHO ON.
  45. REM GREP is a program that searches through text files.  The program FIND,
  46. REM which comes with MS-DOS, works for files under 64K in length.  It is
  47. REM worth your while to search for a program called GREP or with the word
  48. REM GREP in its name, or just any kind of command-line text search program.
  49. REM BEEP is a program I have that beeps when you type it.  You can remove it.
  50. REM LIST is the program that lists the results of the file.  You can use the
  51. REM line TYPE D:\SEARCH\RESULTS\%1 | MORE if you wish.
  52. @echo on
  53. GREP -i "%1" D:\SEARCH\*.* >> D:\SEARCH\RESULTS\%1
  54. BEEP
  55. LIST D:\SEARCH\RESULTS\%1
  56. @echo off
  57. GOTO END
  58.  
  59.  
  60. REM In case the user didn't type it a file name, the batch file skips to here.
  61.  
  62. :JAIL
  63. @echo off
  64. echo Syntax: SEARCH whatyouwant
  65. echo.
  66. echo You may need to customize SEARCH.BAT for your own use.  Please contact
  67. echo Kenneth Udut at (908) 241-6246, on The Juice Bar BBS (908) 298-0764,
  68. echo or via the Internet at kudut@hamp.hampshire.edu if you need help.
  69. echo.
  70. echo Best Bet of all:  Contact your local computer guru.  Every place has at
  71. echo least one.  :)                                                    --Ken
  72. echo.
  73. echo Finished!                                      CopyMight (c) 12/28/1992
  74. echo.
  75. beep
  76. beep
  77.  
  78. :END
  79.