I am needing a script to open a file, search for two different things in the text, then write to the file based on what it finds. The file that needs to be opened is located in the "c:\tpnt\tester\" directory and the file name is "TP600.cur". It needs to search first for "iisnaic.com" and if it finds that anywhere in the file quit. If it does not find that it needs to search for "DEST#*" the * will be a single digit 0-9 and it will need to return what the highest digit is and then write the following;
DEST#*="IBT FBI" EMLDMN trace.xfm trace.xfm SMTP 1
EML_DEST#*.CONTENTTYPE=Content-type: application/octet-stream ; name=efts.sub
EML_DEST#*.SUBJECT:0=%ORI(0)% + "." + %TCN(0)% + ".APPLICANT"
All of the * will need to be replaced with the next sequential number from above. So if the highest it returns is DEST#3 I need it to write each * as a 4.
Any help with this would be greatly appreciated.