| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Testing for String in Fil |
-=> Quoting Jasen Betts to TONY PATER <=-
JB> :: assuming you want to check the files in %folder do this ...
JB> for x in (%folder%\*.*) do ( input %%firstline < %x
JB> if %{at}index["%firstline",BFE] ne -1 call dosomething %x)
JB> I've used call here instead of goto incase the folder contains more
JB> than one file with the matching string, you'll need to replace
JB> dosomething with a BTM to do whatever processing you want done. and you
JB> can replace %folder% with any expression naming the folder .... (fyi
JB> this way files will be closed)
JB> There are times when fileopen and findfirst can be useful, they are
JB> very rare. I usually find for and input to be more convenient.
Now that is worth looking into JB ..... as a keeeeewwll sub-routine
as the folders contain many (but not all) files with the key 'BFE'.
Many thanks
Tony
Sydney, Oz
Mon 02/11/1998 0:17:06
... 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™.