What about single file or list of specified files?
>I tried Yuri's suggestion... VERY COOL and FREE! WinZip will open the files if you need to verify the results. I also noticed it compressed the subdirectories as well. I don't know if you can do single files, but if you can create a directory and compress just that directory it works great.
>
>
>*To zip file
>
>cFileZip = "C:\temp2\D401001F.ZIP"
>cSource = "c:\temp1\"
>strtofile(chr(0x50)+chr(0x4B)+chr(0x05)+chr(0x06)+replicate(chr(0),18),cFileZip)
>o=CREATEOBJECT("shell.application")
>FOR EACH ofile IN o.NameSpace(cSource).items
>o.NameSpace(cFileZip).copyhere(ofile)
>ENDFOR
>
>
>*Unzip files
>
>
>cFileZip = "C:\temp\D401001F.ZIP"
>cDestination = "c:\temp\"
>
>o=CREATEOBJECT("shell.application")
>FOR EACH ofile IN o.NameSpace(cFileZip).items
>o.NameSpace(cDestination).copyhere(ofile)
>ENDFOR
>
>
>>I need to incorporate zipping into an app in vfp 9. I have used several things in the past, but wanted feedback on what users have done lately. It has been a while since I had to incorporate this functionality.
>>
>>TIA!
If it's not broken, fix it until it is.
My Blog