home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a079 / 1.img / FPDG.LZH / VOL2NUM0 / FINDTEXT / FINDTEXT.APP (.txt) next >
Encoding:
MS Visual FoxPro App  |  1993-02-01  |  1.8 KB  |  23 lines

  1.             
  2. Enter File skeleton: 
  3. Enter Search String: 
  4. textfile
  5. FFFR^DF
  6.  occurrences found in file:
  7. FILENAME
  8. sSRCH
  9. desigSTRING
  10. indNFILES
  11.  TEXTFILE
  12. ACOUNT
  13. rl+GTEXT
  14. The primary purpose of the FINDTEXT.PRG program illustrates how to use the ADIR() function and how to APPEND a text file to a database. 
  15. The program lets you specify a wildcard specification for text filenames and a search string. Then the program searches through the text files to locate instances of the search string. Each time FINDTEXT.PRG finds an instance, it displays the file name and the line of text containing the  the search string. 
  16. The program first prompts you to enter a file skeleton and a search string. ADIR() is called to build an array containing the names of all files that matched the file skeleton.
  17. Next, each file in the array is processed. The text file is appended to an empty temporary database. Next, the program searches for an instance of the search string in the text contained in the database records. Every time it is found, the line of text displays. The program also counts and reports the number of instances of the search string.
  18. FINDTEXT.PRG
  19. h:\foxprow\
  20. FINDTEXT.FXP
  21. f:\jebwin\vol2num0\findtext\
  22. FINDTEXT.ART
  23.