title: Search text file to see if string is present
body: <p>I am very new to programing so I apologize in advanced. </p>
  
  <p>So I am trying to create a Win App to make copying files using Robocopy easier and eventually other tasks. Basically what I have so far is a Button that calls the Sub Robcopy_EXE. There is a tab on the form with 100 check boxes, one for each terminal, that will be designated by the user and a check box to determine if you want a detailed report or not from Robocopy. I also have a text box for the user to input the first 3 octets of the site IP Address. The check boxes and Input field are used to create string "Terminal_input" which is what runs Robocopy in CMD. Robocopy logs its progress to a text file that I have labeled "Status.txt". That is as far as I have gotten.</p>
  
  <p>At this moment I need to know when the the current running update is done to progress to the the next terminal. I am trying to continuously read the "Status.txt" file and look for the word "ENDED" to progress to the next terminal. If the word "ENDED" is not present I want to update LABEL3 to "Updating Terminal"</p>
  
  <p>Ultimately I would like to have a way of making the checkbox# a variable that increments as it progresses through each checkbox#, but I will mess with that after I figure out how to check for 1 terminal to be completed.</p>
  
  <p>Like I said I'm new to programing and I am having a lot of fun figuring this out, but I am very stumped on this procedure and I am going about it the worst way possible :D</p>
  
  <p>Thanks in advanced.</p>
  
  <pre><code>   Private Sub RoboCopy_EXE()
          Dim Robocopystart = "Robocopy C:\wtg\update \\"
          Dim Robocopymid = IP_Input.Text
          Dim Robocopyend = ".42\c$\wtg /E /copy:datsou /r:3 /w:20 /log+:status.txt /tee /ns /nc /nfl /"
          Dim Terminal_Input = Robocopystart + Robocopymid + Robocopyend
          If CheckBox10.Checked Then
              If RoboCopy_Detailed_Progress.Checked = True Then
                  Shell("CMD.exe", vbNormalFocus)
                  Threading.Thread.Sleep(400)
                  SendKeys.SendWait(Terminal_Input)
                  Label3.Text = items
              Else : RoboCopy_Detailed_Progress.Checked = False
                  Shell("CMD.exe", vbNormalFocus)
                  Threading.Thread.Sleep(500)
                  SendKeys.Send("Test2")
              End If
          End If
      End Sub
  </code></pre>