Guidance
指路人
g.yi.org
software / rapidq / Examples / String & Text / Multi-File Search.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'From: Bat'Kiro  Sep 4th, 2002, 10:55am
'search a directory of files for text in the file eg the word "compose" then
'display the files that have these results

     $INCLUDE "rapidq.inc"

     DIM file_list AS QFILESTREAM
     DIM file_search AS QFILESTREAM

     DIM filelist AS STRING :'your list of files
     DIM search_what AS STRING :'your search string

     filelist="filelist.txt" :'or another file
     search_what="Rapid-Q" : 'or another string

     file_list.OPEN(filelist,fmOpenRead)
     DO
      IF file_list.eof THEN EXIT DO
      fn$=file_list.readline
      file_search.OPEN(fn$,fmOpenRead)
      DO
       IF file_search.eof THEN EXIT DO
       lin$=file_search.readline
       IF INSTR(lin$,search_what)>0 THEN
        SHOWMESSAGE fn$
        EXIT DO
       END IF
      LOOP
      file_search.CLOSE
     LOOP
     file_list.CLOSE
掌柜推荐
 
 
¥860.00 ·
 
 
¥410.00 ·
 
 
¥288.00 ·
 
 
¥918.00 ·
 
 
¥288.00 ·
 
 
¥264.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-09-07 15:47:12