# Monday, December 08, 2008

VFPCompression Bug Fixes
I received some really good feedback after posting my previous blog entry concerning this library from Curt Hamlin and Eduard. There were two bugs there that I felt needed some immediate attention, so in this blog entry I present a version of VFPCompression that addresses them.

The first bug was the one that Curt Hamlin ran into where something screwy was going on if the zip file wasn't somehow relative to the files or folders being zipped. The following code...

ZipOpen("F:\MyZipFile.zip") && note zip is going to F: drive
ZipFolder("C:\MyFolder\", .F.)  && note folder being zipped is on C: drive
ZipClose()

...would result in an empty zip file being created (not good). While the other bug was the one that Eduard reported where the ZipFolderQuick function wasn't applying the optional password to the files being zipped. To make a long story short, I was able to verify that these were actual bugs in the library, and I have uploaded a new version of VFPCompression.fll that fixes them.

VFPCompression Enhancement
Something that I didn't like in the FLL was that in order to extract the contents of a zip to a particular folder that folder had to already exist in the file system. I decided that the FLL should try and create a folder if it doesn't already exist when extracting, which it now does.

VFPCompression FLL Download (approx. 38 KB)

The VFP Compression Library sample code and documentation can still be found at my previous blog entry.

Monday, December 08, 2008 11:35:21 AM (GMT Standard Time, UTC+00:00)  #    Comments [14]
Thursday, December 11, 2008 4:16:42 PM (GMT Standard Time, UTC+00:00)
Hi Craig

Does this version of VFPCompression.fll require a newer version of the C+ runtime files because I keep getting a message saying that the FLL file is invalid? I am using msvcp80.dll etc.

Thanks,
Simon
Simon White
Thursday, December 11, 2008 6:08:18 PM (GMT Standard Time, UTC+00:00)
Hi Simon,

This one uses the 7.1 runtimes. Just throw msvcr71.dll and msvcp71.dll into System32 and all of the DLLs I post on this blog will work. I don't even have VS 2005 on my machines anymore. I keep VS 2003 and the latest version of VS on my machines... right now VS 2008, but not too long and it will be VS 2010.
Thursday, December 11, 2008 6:28:39 PM (GMT Standard Time, UTC+00:00)
Hi Craig,

In case you missed it, I posted a message on your previous vfpcompression page of 9/30 before I noticed that you had already made another update. Those comments still apply to the latest version. Thanks also for your consistent support of msvcr71.dll and msvcp71.dll.

Mike
Tuesday, December 16, 2008 5:36:06 PM (GMT Standard Time, UTC+00:00)
Hi Mike,

I read through your comment. Thank you for the detailed feedback. I'll take a look at the documentation vs. behavior, and look into the datetime issues you note. Sorry I didn't address these issues for this release.
Wednesday, December 17, 2008 4:18:47 PM (GMT Standard Time, UTC+00:00)
Hi Craig

Might be worth pointing out in your documentation that to loop through all the files in a .zip file using the UnzipAFileInfoByIndex() function using FOR...ENDFOR, that the first file will be at 0, not 1.

So you need:-

FOR i = 0 TO UnzipFileCount() - 1
UnzipAFileInfoByIndex([laTemp],i)
* Code
ENDFOR
Friday, January 09, 2009 6:11:33 AM (GMT Standard Time, UTC+00:00)
Hi Craig


I made one Zip File for Installation Package...

File Size is 39 MB..

I try to Following Command.. but some file is not extracted (life exe,dbf).. with respect of folder.. only image file is extracted..

? UnzipOpen("C:\PFIGER\LIFEPLUS\UPDATE\updtlifeplus.zip")
? unZipTo("C:\PFIGER\LIFEPLUS",.F.,MyPassword)
? UnzipClose()

Please Help Me

Kalpesh
Monday, January 12, 2009 6:38:47 PM (GMT Standard Time, UTC+00:00)
I put in this rss because the original is broken

VFPConnection Update - HTTP Post, FTP Commands and More...
----

For some reason, this doesn't work for me.

When I put

?FTPSPut("diego.txt", "SFTP://user:password@192.168.144.176:22/diego.txt","MyProgress()", "MyTrace()")


The messages show that connects but when you try to transfer the error...

STATUS: error 140770FC:SSL routine :SSL23_GET_SERVER_HELLO : unknown protocol.

what is wrong?

Thanks !!
Diego
Friday, January 16, 2009 2:06:15 AM (GMT Standard Time, UTC+00:00)
Hi Craig,

Could the VFPCompression run at the 64bit system?
When i called this fll on Server 2003 standard 64bit, the windows shows the error message "Library file VFPCompression.fll is invadil". But same the file ran on Windows XP 32bit, no problem.
Would you provide some solution to run the file on 64bit system?

Thanks.
Jurgen Chan
Tuesday, February 17, 2009 10:42:22 PM (GMT Standard Time, UTC+00:00)
Wish we had a way to specify output path.
Matt Slay
Thursday, February 19, 2009 2:26:52 PM (GMT Standard Time, UTC+00:00)
Hi Craig,
Thanks for the very useful add-on. We had an application that was sometimes attaching huge files to e-mails. We have utilized this tool so that it now attaches a ZipFile, works a treat. Although I agree with Matt above it would be great if the output path could be specified.

Thursday, February 19, 2009 3:21:08 PM (GMT Standard Time, UTC+00:00)
Opps... I'm sorry for my stupid comment about output path. Very clearly, Craig has provided this capability... By reading the very nice documentation he made for this tool in an earlier post, I could then see how to do it. I should have spent more time reading, rather than just whipping out a comment. Sorry Craig.

When I said "output path", I was wanting to control where the output zip file would be created. At first I was just using ZipFolderQuick('C:\MyDataPath\SomeCertainFolder'), which simply places the zip in the folder being zipped. I wanted it to be off on another drive letter. That's when I read some more and found this recommended sequence:

ZipOpen('D:\Backups\SomeZipName.zip') <-- Can specify output path and zip name here
ZipFolder('C:\MyDataPath\SomeCertainFolder')
ZipClose()
Matt Slay
Thursday, February 19, 2009 4:20:23 PM (GMT Standard Time, UTC+00:00)
About UNC path support... ZipFolder() works with UNC paths, but ZipOpen() does not.

Am I missing something?

ZipOpen('\\MSPC3\Backups\SomeZipName.zip') <--- Will not work
ZipFolder('\\FS4\MyDataPath\SomeCertainFolder') <-- Does work
ZipClose()

Matt Slay
Thursday, February 19, 2009 9:38:35 PM (GMT Standard Time, UTC+00:00)
Password problem: Using ZipFolder() to create a zip, even when I do not specify a password when creating the zip, it asks for one when trying to unzip from Windows through My Computer. You cannot continue at that point, since there is not a password, but it wants one. I tried a space and clearing out the input box, but, no luck.

Is this tool intended to allow uzipping outside of VFP? As long I specify a password when creating the zip, then it asks for it when unzipping though Windows, and everything works fine.

However, I am hoping to create zips without passwords.
Matt Slay
Tuesday, March 17, 2009 9:33:34 AM (GMT Standard Time, UTC+00:00)
vfpcompression is need to be applicate.
Comments are closed.

 

Archive

<July 2009>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678