TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: All
from: Tony Pater
date: 1998-10-22 22:43:40
subject: Testing for String in File ?

Hi Everyone

 This is getting exciting :-) !

 I've now finalised operating a particular suite of BTMs
 to manage the E-mail files intelligently.

 I'd just like to make a couple in the suite 'smarter'
 by testing for a string in the first line of a email
 file within some of the folders - then report back.

 I'm on shaky grounds here, coz I think it's sumink to
 do with 'fileopen', 'fileread' and 'fileclose' and
 produce an error message from the test after 'fileopen' ?

 Problem 
 'Fileopen' obviously (?) requires the 'name(s)' of a file
  to open. Trouble is that the filenames are randomly
  generated by the Email programme (Mr2ice), so, although
  there are files within the folder(s), I can't define
  a filename to open - unless 'FileOpen' accepts wildcards ?

  Using 'FindFirst' can use wildcards & attributes - would
  that be the way to tackle the search for a file to be
  opened given that it is a randomnly generated filename ?

 Question

  Can someone post me a snippet of thier code(s) as to
  an effective way to :

    . check that a file(s) within a folder(s) contain
      a string (ie. I wish to test for 'BFE' in the first
      line of the file(s) ..... before using a 'goto' ?
    
    . Would the 'test' close the file(s) [using fileclose],
      before the 'goto' ?

  An example of how you handle/check/test for a string in
  an opened file would be much appreciated.

 Thanks for any input - before I goof up :-)

 Ciao
 Tony
 Sydney, Oz
 Fri 23/10/1998  9:11:29  

... 4dos/4os2.. under Warp 4
--- FMail/2 1.22+
* Origin: Cyberia: You know you want it. [02-9534-1702] (3:712/848)
SEEN-BY: 396/1 632/0 371 633/260 267 270 371 635/506 728 639/252
@PATH: 712/848 888 311 640/201 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.