I'm a bit rusty with Autoplay as I haven't had the need to create a new project in years but I am working on a new project and have hit a bit of a road block.
A little background of what I am trying to accomplish. I have a CSV file on an FTP that contains 2 fields of data on each line like so:
"123","abc.lic"
"456","efg.lic"
What I am trying to do is to read in the CSV file, search based on data in the first field. If a match is found, I need to capture the data in the second field so I can use it further on in the script. I have the button setup to download the file locally.
What I have tried so far is:
This searches the string and finds a match, but how do I pull the data from the second field?? Additionally, this only captures the position, not necessarily a line number.
I'm thinking that I need to read the text file into a table, but I don't see how I can search the table. Any help or guidance would be greatly appreciated.
A little background of what I am trying to accomplish. I have a CSV file on an FTP that contains 2 fields of data on each line like so:
"123","abc.lic"
"456","efg.lic"
What I am trying to do is to read in the CSV file, search based on data in the first field. If a match is found, I need to capture the data in the second field so I can use it further on in the script. I have the button setup to download the file locally.
What I have tried so far is:
Code:
-- Read contents of file to a string contents = TextFile.ReadToString("C:\\faircomlic.txt"); -- Search string for sentinel number that is in registry sentfound = String.Find(contents, registrysent, 1, false);
I'm thinking that I need to read the text file into a table, but I don't see how I can search the table. Any help or guidance would be greatly appreciated.
Comment