So I'm at the very end of my program. I have my finished files and all I want to do is zip and copy them to a new folder. The only catch is, it makes my final .zip empty because it didn't finish compressing before it copied it over. How can I make it wait for the compression to happen before coping the zip over? The compression phase runs asynchronously so I can't seem to figure it out. Any help would be awesome.
ZIP code-
ZIP code-
Code:
Dim startBuffer() As Byte = {80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, _
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
FileIO.FileSystem.WriteAllBytes("C:\Users\" & Username & "\AppData\Roaming\HHMI\empty.zip", startBuffer, False)
Dim sf As New Shell32.Shell()
Dim tipin As Shell32.Folder = sf.NameSpace("C:\Users\" & Username & "\AppData\Roaming\HHMI\JAR")
Dim tipit As Shell32.Folder = sf.NameSpace("C:\Users\" & Username & "\AppData\Roaming\HHMI\empty.zip")
tipit.CopyHere(tipin.Items, 4)