![]() |
![]() |
We are currently migrating this forum over to our HelpSystems domain. Please post all new threads in our new HelpSystems Community Portal. |
![]() |
|
![]() |
AutoMate Discussion | ![]() |
Topic Title: Task help:If Text Contains Topic Summary: Created On: 07/20/2018 08:12 AM Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
||||||||||||
I'm trying to scan text files we're moving from our sFTP to our network share for special characters. I'm having a hard time figuring out which actions to use to complete this task.
I've been looking at "If text contains" but I'm having trouble searching for multiple possible characters to stop the task. Basically I want to search a text file that I move for any special characters (Text file can only have letters, numbers and spaces) and stop the task if it finds one. Can you help?
|
||||||||||||
|
||||||||||||
![]() |
||||||||||||
Hello Stephen,
You are on the right track to look for special characters. However you will need to combine it with other actions to look through a text file. We suggest first reading the entire file into a variable. Once it is read, you can use the "loop list" action to loop through the file line by line (make sure to set the delimiter to "new line"). Inside of the loop, use the "if text contains" action to look for the character. In essence you will be looking for that character line by line of the file. Attached you will find an example of this procedure. I have added dialog boxes to show you the current line, and one to show when the character is found. Make sure to put the sample file under C:\temp. Please let us know if that works for you. Thanks.
------------------------- ![]() Alex Escalante | Support Analyst AutoMate | Division of HelpSystems HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665 |
||||||||||||
|
FuseTalk Enterprise Edition v4.0 - © 1999-2019 FuseTalk Inc. All rights reserved.