Extract strings from multiple text files
Posted on 2010-09-24
I have an application that works based on an "optionfile.app" on each server. This is actually a txt file that can be opened with notepad. The path of the optionfile is the same in all servers, something like "C:\App\optionfile.app".
I need a script to pull two specific lines from every optionfile.app from every server. Assume that the optionfile is something like this:
From every optionfile, I need to extract these two lines:
and output to a txt or csv file, does not matter. I've done some research that I can extract this with VB.net and using RegEx but this will run on every server (Windows 2003, 2008 both x86 and x64) so I don't think a .NET solution is reliable.
Any help and direction appreciated. Thanks.