home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3052 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.3 KB

  1. Path: combo.ganesha.com!peterk
  2. From: peterk@combo.ganesha.com (Dr. Peter Kittel)
  3. Subject: Re: search engine
  4. Newsgroups: comp.sys.amiga.programmer
  5. Reply-To: peterk@combo.ganesha.com
  6. References: <2205f9d8.0@amuc.mtroyal.ab.ca> <4f9fn7$q68@sinsen.sn.no>
  7. Message-ID: <peterk.0km6@combo.ganesha.com>
  8. Date: 9 Feb 96 20:49:02 MEZ
  9. Organization: Private Site
  10.  
  11. In article <4f9fn7$q68@sinsen.sn.no> ilan@sn.no (Ilan Sharoni) writes:
  12. >On 02-Feb-96 16:16:24, MCollette (637684755@amuc.mtroyal.ab.ca) Wrote:
  13. >>Does abyone have any ideas as how to make a search engine that looks through
  14. >>directories until it finds a file? My biggest problem is finding what sub
  15. >>directories are in a directory, then changing to that sub directory. Please
  16. >>help me with this, and keep in mind I only have Kick Start 1.3
  17. >
  18. >Did you try
  19. >1>search <path> <name|pattern> file all quiet
  20. >                               ^^^^ ^^^
  21.  
  22. Sorry, he says he has only 1.3, where this is not yet available.
  23. So the advice is: Update to 3.1 as fast as you can. If you really
  24. want to stay with 1.3, you have to replace the *single* line above
  25. by complicated DOS scripts. I'll list three of them below, just
  26. study them. Caution: these scripts call one another.
  27.  
  28.  ********************************************
  29.  
  30. This is the file s:rlist
  31.  
  32. .key pat,nohead/s,quick/s,block/s,keys/s,dates/s,nodates/s,rx
  33. failat 21
  34. if "<rx>" eq ""
  35.   echo >T:rlf<$$> " "
  36.   endif
  37. list >>T:rlf<$$> "<pat>" files <nohead> <quick> <block> <keys> <dates> <nodates>
  38. if not fail
  39.   if "<nohead>" eq ""
  40.     echo >>T:rlf<$$> " "
  41.     endif
  42.   list >T:rld<$$><rx> "<pat>" dirs lformat="execute s:rlist *"%s%s*" <nohead> <quick> <block> <keys> <dates> <nodates> RX=I<RX>"
  43.   execute T:rld<$$><rx>
  44.   delete  T:rld<$$><rx> quiet
  45.   echo "<pat>"
  46.   if "<rx>" eq ""
  47.     echo " "
  48.     type t:rlf<$$>
  49.     delete t:rlf<$$> quiet
  50.     endif
  51.        else
  52.   echo "<pat> not found"
  53.   endif
  54.  
  55.  
  56.  
  57.  ********************************************
  58.  
  59. This is the file s:rlistk
  60.  
  61. .key pat,nohead/s,quick/s,block/s,keys/s,dates/s,nodates/s,rx
  62. failat 21
  63. if "<rx>" eq ""
  64.   echo >T:rlf<$$> " "
  65.   endif
  66. list >>T:rlf<$$> "<pat>" files <nohead> <quick> <block> <keys> <dates> <nodates>
  67. if not fail
  68.   if "<nohead>" eq ""
  69.     echo >>T:rlf<$$> " "
  70.     endif
  71.   list >T:rld<$$><rx> "<pat>" dirs lformat="execute s:rlist *"%s%s*" <nohead> <quick> <block> <keys> <dates> <nodates> RX=I<RX>"
  72.   execute T:rld<$$><rx>
  73.   delete  T:rld<$$><rx>
  74.   if "<rx>" eq ""
  75.     type t:rlf<$$>
  76. ;    delete t:rlf<$$>
  77.     endif
  78.        else
  79.   echo "<pat> not found"
  80.   endif
  81.  
  82.  
  83.  
  84.  
  85.  ********************************************
  86.  
  87. This is the file s:rles
  88.  
  89. .key pat,rx
  90. failat 21
  91. if "<rx>" eq ""
  92.   echo >T:rlf<$$> " "
  93.   endif
  94. list >>T:rlf<$$> "<pat>" files lformat="echo *"%s%s*"*ntype *"%s%s*" to nil:"
  95. if not fail
  96.   if "<nohead>" eq ""
  97.     echo >>T:rlf<$$> " "
  98.     endif
  99.   list >T:rld<$$><rx> "<pat>" dirs lformat="execute s:rles *"%s%s*" RX=I<RX>"
  100.   execute T:rld<$$><rx>
  101.   delete  T:rld<$$><rx>
  102.   if "<rx>" eq ""
  103.     execute t:rlf<$$>
  104.     delete  t:rlf<$$>
  105.     endif
  106.        else
  107.   echo "<pat> not found"
  108.   endif
  109.  
  110.  
  111.  
  112. -- 
  113. Best Regards, Dr. Peter Kittel       //    Visit  http://www.amiga.de
  114. Private Site in Frankfurt, Germany \X/  Email to: peterk@combo.ganesha.com
  115. Employed at Amiga Technologies GmbH in Bensheim, Germany
  116. Much too little time for news and email, sorry. In memoriam Konrad Zuse.
  117.