>I have just started looking at VFPCompression.
>
>It appears that if you zip a folder it includes all sub-folders as well. Is there any way to specify that it zips the files but ignores the sub-folders?
As a workaround you could add the files one by one to the zip archive. Create a collection of the files in the folder and you can do something like this:
LPARAMETERS toFiles AS cCollection OF aBasicGen, ;
tcZipFile, tcPassword
LOCAL llRetVal
llRetVal = ZipOpen(tcZipFile)
IF llRetVal
FOR EACH lcFileName IN toFiles
IF VARTYPE(tcPassword) = "C"
llRetVal = ZipFile(lcFileName, .T., tcPassword)
ELSE
llRetVal = ZipFile(lcFileName, .T.)
ENDIF
ENDFOR
ZipClose()
ENDIF
RETURN llRetVal
Christian Isberner
Software Consultant