title: Waiting For Process To Complete
body: <p>Is there any way to pause a process or wait unitl the process is complete before continuing onto the next line of code?</p>
  
  <p>Here is my current process to zip all PDFs and then delete. Currently, its deleting files before the zipping is complete. Is there a way to pause/wait until the process is complete?</p>
  
  <pre><code>    Dim psInfo As New System.Diagnostics.ProcessStartInfo("C:\Program Files\7-Zip\7z.exe ", Arg1 + ZipFileName + PathToPDFs)
      psInfo.WindowStyle = ProcessWindowStyle.Hidden
      System.Diagnostics.Process.Start(psInfo)
  
      'delete remaining pdfs
      For Each foundFile As String In My.Computer.FileSystem.GetFiles("C:\Temp\", FileIO.SearchOption.SearchAllSubDirectories, "*.pdf")
          File.Delete(foundFile)
      Next
  </code></pre>