How to read by line with BAS?

  • I want to use BAS to read by line in a text or csv file. Example data:

    I only found read file, not read by line.
    Can you show me how?
    Sorry about my english, I'm not native
    Thank you very much: D

  • Hello
    Any update on how you solved the issue?
    I have the same problem now but can not figure out how to extract line by line.
    I have used read file to save string from file text in a variable.
    The problem is i can not import text in list because the jump to line disapear in the string

    look the Original text file :
    alt text

    And now look the result with read file
    alt text

    Its just like BAS delete the line info.

    Basically i would like to retrieve le line containing openvpn on the list
    Please help

  • You can Use Parse Line command (under Tools section) For That


  • @hnb Use Parse line command and do not use any header only valid data csv/txt column must be separate with

    ,  or ; or :

    Do Not use empty line in middle in your csv
    input text/csv data look like this

  • Thank you for the interest @cparonny
    I ve forgot to precise that the result without "line ending symbol" is obtained with
    alt text
    This permit to give me all network card state.
    Then i need to choose the line containing "openvpn" and then check in this line if i find "Connected" or "Connecté"
    Then i break the loop to go through the script because i am sure the vpn has connected.

    In other word is there any function to add "line ending symbol" to string? like in write file parameters?

Log in to reply