If you follow my code below I have read all the lines in from the file already.
Now I need a way to collect just the preferred IP and hostnames from the data below. My thought was to check if the "PreferredFilerIPaddress" string exists in the file then grab the hostname(s) and ip(s) but I can't figure out how to do it.... i keep thinking loop but this is a single file so i don't think I'm on the right track.
Dim SDDATALOG As String = txtPath.Text & "\SnapDriveInfo\SnapDrive_RegistryInfo.log"
Dim SnapDriveData As String() = IO.File.ReadAllLines(SDDATALOG)
Dim prefFlrIP = From p In SnapDriveData Where p.Contains(txtHostName.Text) Select p.Substring(0)
Dim Row1 As DataRow
Row1 = Table1.NewRow
Row1.Item(PrefIP) = If(prefFlrIP.Count > 0, prefFlrIP.FirstOrDefault, "Not Set")
Catch ex As Exception