bmreeves
04-18-2006, 05:04 PM
I have been put in a bit of a situation. I personally like command line scripting but have been asked to write a gui that will do things like grep etc.
I have been using the file.run option and it seems to have problems..please advise.
Here is my code:
result = File.Run("grep.exe", "-i -e test c:\\temp\\test.txt >> c:\\temp\\out.log", "", SW_SHOWNORMAL, false);
grep.exe is in my path
test is the string I wish to search for
test.txt is the file I wish to search in
and out.log is the output file
Also, If someone could help me to use embedded AMS script it would be better than using grep because I wouldnt have to worry if the user has the grep utility installed.
TIA
I have been using the file.run option and it seems to have problems..please advise.
Here is my code:
result = File.Run("grep.exe", "-i -e test c:\\temp\\test.txt >> c:\\temp\\out.log", "", SW_SHOWNORMAL, false);
grep.exe is in my path
test is the string I wish to search for
test.txt is the file I wish to search in
and out.log is the output file
Also, If someone could help me to use embedded AMS script it would be better than using grep because I wouldnt have to worry if the user has the grep utility installed.
TIA