this is probably pretty simple but i'm not seeing it. i'm doing the following
the problem is it deletes the files before they can be extracted. i tried to use system.threading.thread.sleep(lots o seconds)
how can i make the program wait for the process to finish?
as always any help is welcomed.
Code:
Process.Start("C:\Program Files\7-Zip\7z", "x" & " " & G.StagingDirectory & " " & "-o" & G.StagingDirectory)
'goes through directory and deletes the .mdoc files after they have been extracted
Dim filecount As Integer = 0
For Each filename As String In IO.Directory.GetFiles(G.StagingDirectory, "*.mdoc")
IO.File.Delete(filename)
filecount = filecount + 1
Next
how can i make the program wait for the process to finish?
as always any help is welcomed.