ECCSS
asked on
VBScript to Read Text file and Extract certain text then email it
i need a script to read a text file and extract lines that have specific words then email those lines.
An example is below of the information note the path and file that it is refering to updates regularly. So the key words it will be looking for in the script is Updated,New, Failed and Error.
This is the information I require in the email.
Updated: d:/ftp/roadmaps.zip
Updated: d:/ftp/crscjac.zip
Updated: d:/ftp/roadmaps.zip
New: d:/ftp/sjairw.zip
New: d:/ftp/roadmaps.zip
Updated: d:/ftp/roadmaps.zip
An example is below of the information note the path and file that it is refering to updates regularly. So the key words it will be looking for in the script is Updated,New, Failed and Error.
This is the information I require in the email.
Updated: d:/ftp/roadmaps.zip
Updated: d:/ftp/crscjac.zip
Updated: d:/ftp/roadmaps.zip
New: d:/ftp/sjairw.zip
New: d:/ftp/roadmaps.zip
Updated: d:/ftp/roadmaps.zip
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Running the script will extract any matching lines from the text file and email them to the specified address. As written, the search is not case-sensitive.
Open in new window