title: copy files to remote servers checks
body: <p>I Have around of 100 remote servers and below how I am trying to copy some files 
  from my PC to all of these remote servers but I want to do some checks </p>
  
  <p>1- check if the connection to remote servers is available if NOT then go to next office </p>
  
  <p>2-for user interaction </p>
  
  <p>a- I am trying to color selected row at <code>datagridview1</code> to let user know at whcih office the progress is now and alos at <code>datagridview2</code> the same thing to let user know at which file the progress is now at specific  office but the interface freeze after starting sending file and no interaction happen what to do ?</p>
  
  <p>b-how to color finished office row at green if success ?</p>
  
  <p><strong>Update</strong></p>
  
  <p>I used threading to solve form freezing so the feedback will back to user 
  but problem not solved and still happen and nothing change please what should i do ???</p>
  
  <pre><code>public void PatchUpdates()
  {
      try
      {
          foreach (DataGridViewRow OfficeListRow in DGV_OfficeList.Rows)
          {
              string OfficeIPAddress = OfficeListRow.Cells[2].Value.ToString();
  
              foreach (DataGridViewRow FileListRow in DGV_FileList.Rows)
              {
                  string SoruceFileNamePath = FileListRow.Cells[4].Value.ToString();
                  string DestinationFileNamePath = @"\\" + OfficeIPAddress + @"\usb1_1\test\" + Path.GetFileName(SoruceFileNamePath);
  
  
                  Thread foregroundthread = new Thread(() =&gt; CheckOffice(OfficeIPAddress));
  
                  foregroundthread.Start();
  
                  //check if connection to remote server is available
                  if (CheckOffice(OfficeIPAddress) == 1)
                  {
                      DGV_OfficeList[3, DGV_OfficeList.CurrentCell.RowIndex].Value = "Connected";
                      //file.copy(sorucefilenamepath, destinationfilenamepath, true); //copy files...
                  }
                  else if (CheckOffice(OfficeIPAddress) == 0)
                  {
                      DGV_OfficeList[3, DGV_OfficeList.CurrentCell.RowIndex].Value = "disconnected";
                      break;
                  }
              }
          }
      }
      catch (Exception ex)
      {
          MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
      }
  }
  </code></pre>
  
  <p>check connection method</p>
  
  <pre><code>public int CheckOffice(string _ipAddress)
  {
      int timeout = 120;
      string data = "PingTestData";
      byte[] buffer = Encoding.ASCII.GetBytes(data);
  
      Ping PingSender = new Ping();
      PingOptions options = new PingOptions();
  
      options.DontFragment = true;
  
      PingReply reply = PingSender.Send(_ipAddress, timeout, buffer, options);
  
      if (reply.Status == IPStatus.Success)
      {
          return 1;
      }
      else
      {
          return 0;
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/iX00h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iX00h.png" alt="enter image description here"></a></p>