Link to home
Start Free TrialLog in
Avatar of Danimal
Danimal

asked on

Zipping A File

Using VB, is there a way to grab a file off the local disk and put it into a zip file, or some other compressed format?  I am writing an app that needs to FTP a file from a local PC to a FTP server.  I know how to do that.  The problem is that the file is kinda big to send over the dialup line my client has.  Zipping would make the file transfer go a lot quicker.

Thanks.

-Dan  
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Use the Infozip libraries from http://www.info-zip.org/pub/infozip/ these create pkzip compatible archives from files that you specify. You can use these dlls in your VB project and run from there.
Avatar of msdixon
msdixon

if the client has winzip installed, they have a command line utility.
http://www.winzip.com/wzcline.htm

i've used that quite a bit. it's pretty handy.
hehe, nevermind, it's the same thing as timcottee's link (i just didn't look before posting)
Avatar of Danimal

ASKER

msdixon, thank you.  That command line utility is just the ticket I think.

Unfortunately, however, I have a really stupid problem using it.  I don't know how to execute command line statements from within a VB program.  Could you (or someone) please provide me that missing piece of the puzzle?
you'll need to use the windows scripting host.
ASKER CERTIFIED SOLUTION
Avatar of msdixon
msdixon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Danimal

ASKER

msdixon, you are my hero.  Will you marry me?
i get that a lot, but i don't think my wife would appreciate that.  :-)
Avatar of Danimal

ASKER

I am not even going there!