home *** CD-ROM | disk | FTP | other *** search
- Path: combo.ganesha.com!peterk
- From: peterk@combo.ganesha.com (Dr. Peter Kittel)
- Subject: Re: search engine
- Newsgroups: comp.sys.amiga.programmer
- Reply-To: peterk@combo.ganesha.com
- References: <2205f9d8.0@amuc.mtroyal.ab.ca> <4f9fn7$q68@sinsen.sn.no>
- Message-ID: <peterk.0km6@combo.ganesha.com>
- Date: 9 Feb 96 20:49:02 MEZ
- Organization: Private Site
-
- In article <4f9fn7$q68@sinsen.sn.no> ilan@sn.no (Ilan Sharoni) writes:
- >On 02-Feb-96 16:16:24, MCollette (637684755@amuc.mtroyal.ab.ca) Wrote:
- >>Does abyone have any ideas as how to make a search engine that looks through
- >>directories until it finds a file? My biggest problem is finding what sub
- >>directories are in a directory, then changing to that sub directory. Please
- >>help me with this, and keep in mind I only have Kick Start 1.3
- >
- >Did you try
- >1>search <path> <name|pattern> file all quiet
- > ^^^^ ^^^
-
- Sorry, he says he has only 1.3, where this is not yet available.
- So the advice is: Update to 3.1 as fast as you can. If you really
- want to stay with 1.3, you have to replace the *single* line above
- by complicated DOS scripts. I'll list three of them below, just
- study them. Caution: these scripts call one another.
-
- ********************************************
-
- This is the file s:rlist
-
- .key pat,nohead/s,quick/s,block/s,keys/s,dates/s,nodates/s,rx
- failat 21
- if "<rx>" eq ""
- echo >T:rlf<$$> " "
- endif
- list >>T:rlf<$$> "<pat>" files <nohead> <quick> <block> <keys> <dates> <nodates>
- if not fail
- if "<nohead>" eq ""
- echo >>T:rlf<$$> " "
- endif
- list >T:rld<$$><rx> "<pat>" dirs lformat="execute s:rlist *"%s%s*" <nohead> <quick> <block> <keys> <dates> <nodates> RX=I<RX>"
- execute T:rld<$$><rx>
- delete T:rld<$$><rx> quiet
- echo "<pat>"
- if "<rx>" eq ""
- echo " "
- type t:rlf<$$>
- delete t:rlf<$$> quiet
- endif
- else
- echo "<pat> not found"
- endif
-
-
-
- ********************************************
-
- This is the file s:rlistk
-
- .key pat,nohead/s,quick/s,block/s,keys/s,dates/s,nodates/s,rx
- failat 21
- if "<rx>" eq ""
- echo >T:rlf<$$> " "
- endif
- list >>T:rlf<$$> "<pat>" files <nohead> <quick> <block> <keys> <dates> <nodates>
- if not fail
- if "<nohead>" eq ""
- echo >>T:rlf<$$> " "
- endif
- list >T:rld<$$><rx> "<pat>" dirs lformat="execute s:rlist *"%s%s*" <nohead> <quick> <block> <keys> <dates> <nodates> RX=I<RX>"
- execute T:rld<$$><rx>
- delete T:rld<$$><rx>
- if "<rx>" eq ""
- type t:rlf<$$>
- ; delete t:rlf<$$>
- endif
- else
- echo "<pat> not found"
- endif
-
-
-
-
- ********************************************
-
- This is the file s:rles
-
- .key pat,rx
- failat 21
- if "<rx>" eq ""
- echo >T:rlf<$$> " "
- endif
- list >>T:rlf<$$> "<pat>" files lformat="echo *"%s%s*"*ntype *"%s%s*" to nil:"
- if not fail
- if "<nohead>" eq ""
- echo >>T:rlf<$$> " "
- endif
- list >T:rld<$$><rx> "<pat>" dirs lformat="execute s:rles *"%s%s*" RX=I<RX>"
- execute T:rld<$$><rx>
- delete T:rld<$$><rx>
- if "<rx>" eq ""
- execute t:rlf<$$>
- delete t:rlf<$$>
- endif
- else
- echo "<pat> not found"
- endif
-
-
-
- --
- Best Regards, Dr. Peter Kittel // Visit http://www.amiga.de
- Private Site in Frankfurt, Germany \X/ Email to: peterk@combo.ganesha.com
- Employed at Amiga Technologies GmbH in Bensheim, Germany
- Much too little time for news and email, sorry. In memoriam Konrad Zuse.
-