If you have a new question you’d like our support staff to post a response to, please visit our customer community, GoAnywhere Insiders, to pose the question in our Discussion Boards. We have a thread “Ask Our Tech Experts” that our support team monitors on a regular basis, or you can start a new discussion where other GoAnywhere users and support staff can weigh in. Log in or create your new account at
https://insiders.goanywhere.com.
If you need an immediate response, please create a support ticket or contact our support team by email at
[email protected].
-
fthomas
- Posts: 8
- Joined: Fri Feb 24, 2017 9:40 am
I have a situation where there are multiple text files but I only want to process the files that a have a certain line IN the file. Search and replace seemed like a possibility using the output files variable. However that seems to be all the files it processed. Is there a better way to accomplish this?
-
Support_Rick
Support Specialist
- Posts: 592
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
If these are relatively small files .. then, do a loop through your files, set the file contents to a variable "FileContents", then use the "Contains" function see if "FileContents" has the value you're looking for. Condition based on results...
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
-
fthomas
- Posts: 8
- Joined: Fri Feb 24, 2017 9:40 am
Do you mean using a Read task to store it in a variable? If so, isn't that a row by row examination and not the whole text file?
Then use an IF task to decide what to do with it?
-
Support_Rick
Support Specialist
- Posts: 592
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
Set Variable Task ... not a Read Task.
Then use an if condition to see if the variable "contains" the value you are seeking.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
-
fthomas
- Posts: 8
- Joined: Fri Feb 24, 2017 9:40 am
Thanks! That works perfectly!