Framework EDI Reference. Methods and Properties
ediFileSystem. ZipFile

Compresses the contents of a file to a target file.

Syntax:

Parameters:

Returns

Returns 1 if the operation is successful; otherwise the operation returns zero.

 

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oFileSystem As Fredi.ediFileSystem

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get file system object.
Set oFileSystem = oEdiDoc.GetFileSystem

' Compress a file using ZIPINFO
oFileSystem.ZipFile App.Path & "\TestFile.TXT", CompressMethod_ZipInfo, App.Path & "\ZipFile_ZipInfo.zip"

' Compress a file using ZLIB
oFileSystem.ZipFile App.Path & "\TestFile.TXT", CompressMethod_ZLib, App.Path & "\ZipFile_ZLib.zip"

MsgBox "Done"

Samples