| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Testing for String in File ? |
Hallo Tony,
TP> Problem 'Fileopen' obviously (?) requires the 'name(s)' of a file to
TP> open. Trouble is that the filenames are randomly generated by the Email
TP> programme (Mr2ice), so, although there are files within the folder(s),
TP> I can't define a filename to open - unless 'FileOpen' accepts wildcards
TP> ?
But perhaps the filedate or the filetime might give you the answer (?). In
a loop with the test
do x in *.*
iff %{at}filedate[%x] eq %date then
do your stuff here
enddo
(off the cuff & untested)
TP> Can someone post me a snippet of thier code(s) as to an effective way
TP> to :
TP> . check that a file(s) within a folder(s) contain a string (ie.
TP> I wish to test for 'BFE' in the first line of the file(s) .....
TP> before using a 'goto' ? . Would the 'test' close the file(s)
TP> [using fileclose], before the 'goto' ?
You do not need the "dreaded" {at}fileopen etc. to do that. A simple test like
if %{at}index[%{at}line[MYFILE,0],BFE] ne -1 goto MYLABEL
will be enough.
Ostrhauderfehn, 27. Oktober 1998, 7:53:02
*Klaus Meinhard*
--- WP/95 Release 1.3A (184.0) Reg.
* Origin: Windows: Brought to you by the makers of Edlin! (2:2449/236.1005)SEEN-BY: 396/1 632/0 371 633/260 267 270 371 635/506 728 639/252 @PATH: 2449/236 200 150 24/888 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™.