by stecenko » Thu Oct 24, 2013 2:50 pm
I got this from some where on the Internet (I don't remember where).
WITH thisform
STORE .txtFolderCopied.value TO dlcSource
STORE .txtCopiedTo.Value TO dlcTarget
endwith
IF NOT directory(JUSTPath(dlcTarget))
MKDIR (JUSTPath(dlcTarget))
ENDIF
* create a zip folder by creating a file with the ZIP header bytes:
STORE STRTOFILE(CHR( 80 )+CHR( 75 )+CHR( 5 )+CHR( 6 )+REPLICATE( CHR(0), 18 ), dlcTarget) TO dlnTarget
* copy to the new zip folder via shell.application
oShell = CREATEOBJECT("shell.application")
oShell.NameSpace( dlcTarget ).copyhere( dlcSource, 4096 )
* Hang around until the compression is finished.
Do while oShell.Namespace(dlcTarget).items.Count = 0
WAIT WINDOW "Compressing..." TIMEOUT 2
enddo
I've been using it for years.
Richard Stecenko
Interactive Computer Services Inc.
Victoria, British Columbia
204.453.2052