[REBOL] Re: Newbie: Grep question
From: brock:kalef:innovapost at: 13-Jul-2004 9:55
This may help you out a little - not the most efficient algorithm, but provides a very
simple little gui to select the directory to search. Also outputs a list of files found
as well as displaying the files as they are found in the console window.
; find only directory portion of path - exclude file name
data-src: request-file/only/title "Select any File from the Data Folder to Process" "Open"
data-src: first split-path data-src
result-list: copy 
find-text: request-text/default "Enter text to find"
files: read %.
print ["File containing: " :find-text newline]
foreach file files[
data: read/lines file
foreach d data[
if all[find d find-text cnt = 0][
print [file "^-^-FOUND"]
append result-list file
cnt: cnt + 1