Do Until zip.Items.Count = Fol.Items.Count WScript.Sleep 300 Loop
When the circuit is complete, your copy is complete.
But if you only want to copy, not ZIP, FSO or WMI is better.
If you are looping and want them in the file, you need to create the zip file yourself, first in the right header. In addition, you only get IIRC compressed files / folders. Something like that:
Set FSO = CreateObject( "Scripting.FileSystemObject" ) Set File = FSO.OpenTextFile( saveFile, 2, True ) File.Write "PK" & Chr(5) & Chr(6) & String( 18, Chr(0) ) File.Close Set File = Nothing Set FSO = Nothing
2 in OpenTextFile is ForWriting.
source share