Search Text in .txt then send Mail
Ivana_Jenny
![]()
- Joined: Aug 26, 2011
- Posts: 19
Hi everybody,
I want to search this text "RESTORE DATABASE successfully processed" in this file: "Test.txt" and if this text would be found in the .txt then WinAutomation should send an E-Mail...
Can someone help me, how i could search in a file for an especially text?
Best regards,
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2333
Hi Ivana, Welcome to our Forum! You would need to use the following actions: >>> Read Text from File "test.txt" --> %FileContents% >>> If %FileContents% contains "RESTORE DATABASE successfully processed" >>>>> Send Email --> Text found! >>> End If Hope this makes sense, please let us know if you need any assistance implementing the above mentioned solution. :) Samantha
Ivana_Jenny
![]()
- Joined: Aug 26, 2011
- Posts: 19
Hi Samantha
Thank you for the answer.
In the meantime I've found a solution.
Action1: Read Text From File
Action2: Parse Text (Varible: %TextFound%)
Action3: If %TextFound% <> -1 then
Action4: Send Mail
End if
According to my tests it worked. Do you See a mistake in my reasoning?
THANKS !
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2333
That's fine! It's a more complex approach, but it will give you the same result :) Samantha
Ivana_Jenny
![]()
- Joined: Aug 26, 2011
- Posts: 19
Very good,
Thank u so much!!!!! :)
Thread could be -closed-
Login to post a reply Not a member yet? Register