Text Search

This task allows you to search for a string of text (or multiple strings) within a file (or within multiple files) in a directory.  If the text is found, then the line containing the text is appended to a results file.  You can also choose to append surrounding lines to the results file.
You can use this task to search for text in web pages, or in files located on a ftp server.  Just run the web download or ftp download (get) tasks and download the file(s) to a local directory.  Then run this Text Search task against the downloaded file(s) in the directory.

Source Directory
Enter the full path name of the directory where the file(s) you need to search resides.

Filename
Enter the name filter for the files you wish to copy  using the following wildcard rules
This field also supports dynamic variables.  Using dynamic variables, you can select a file based on current date/time in addition to the normal wildcard search

Search Term
Enter the search term required.  If you have more than 1 search term, seperate them by a character not included within the search term.  Example: Searching^Java^Automation .  This field also supports dynamic variables.  Using dynamic variables, for example, you can search a logfile for todays date/time and run a task if that entry is found.

Search Term Separator
Enter the separator character used between search terms, if you have more than 1 search term.

Surrounding Lines
If a search term is found, the line is appended to the results file.  If you need to append surrounding lines also, select the desired number of surrounding lines to append.

Results Directory
Enter the full path name of the directory where you need to put the results File.  Note that the path is case sensitive on unix systems.

Results File
Enter the name for the results File.  If left blank, a default filename of your task title is used.  This field also supports dynamic variables.  Using dynamic variables, you can save the file to a customized name based on date/time or username etc...

Append to Filename
If you are regularly archiving a directory and wish to save each archive to a different filename based on current time/date or on custom code you set, choose the append file option which best suits your archive frequency.