Subj : Search To : Dale Shipp From : Gerald Miller Date : Tue Jan 11 2005 09:03 am Hello Dale, Responding to a post in the 4DOS area: On Monday January 10 2005 at 23:38, Dale Shipp [1:261/1466] wrote to All, about: Search DS> Is there a command in 4NT that will search a file for a particular DS> string and then allow the string following that to be read? DS> I have seen commands that allow looking for a file that contains a DS> string, but can't see that it does anything other than returning the DS> file name. DS> Explicitly I want to search a file for the string DS> Attachment COnverted: DS> and then take the string following that to use as a file name DS> parameter into another command. DS> I could write a C program to do this, but using 4NT would be easier. I'm not sure about 4NT, but with 4DOS, I use FFIND. I don't know if you can apply my example to your requirements but here's how I use it: === Cut Begin: SNIPPET.BTM === set xan=%@word[2,%@execstr[FFIND /k/m/r/t"node 1 (dialup), 1:342/806" %= C:\Fd\FD.LOG]] iff "%xan" NE "Xanadu" then goto looper else call C:\4d\4b\TESTIME.BTM endiff === Cut End: SNIPPET.BTM === I _WAS_ using the above snippet to synchronize my system clock to that of my host (1:342/806) by searching my FrontDoor log file for the string Xanadu. My Testime.btm would then search the FrontDoor log file for the strings "RTime" (Remote Time) and "LTime" (Local Time) and compare the values following those two strings... === Cut Begin: TESTIME.BTM === ..... set ret=%@time[%@word[6,%@execstr[FFIND /k/m/r/t"RTime" C:\Fd\FD.LOG]]] set lot=%@time[%@word[6,%@execstr[FFIND /k/m/r/t"LTime" C:\Fd\FD.LOG]]] set remot=%@maketime[%ret] set local=%@maketime[%lot] ..... === Cut End: TESTIME.BTM === I hope that is of some help to you. Cheers ... Gerald --- GoldED+/DPMI32 v1.1.5-040330 * Origin: Ant-like, you armor your house in dust. (1:342/512) .