Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Zip files & unzip files - Please help


Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2004, 12:59 AM
Newhire Newhire is offline
Newcomer
 
Join Date: Oct 2004
Posts: 24
Default Zip files & unzip files - Please help


Hi all,

I'm developing one tool which read & modify files inside the zip file.

If you know how to do it, please tell me.

Thanks a lot for your help!

New hire
__________________
Money is not problem, just no money is a big problem
Reply With Quote
  #2  
Old 11-16-2004, 03:22 AM
OMID SOFT OMID SOFT is offline
Contributor
 
Join Date: May 2004
Location: Richmond Hill
Posts: 538
Default

If you have WinZip installed on the target system :
Code:
'Inputs, Example:
'source = app.path & "source.exe"
'target = app.path & "target.zip"
'zip = true (compress)
'zip = false(uncompress)
-
Code:
Function winZipit(ByVal source As String, ByVal target As String, ByVal zip As Boolean) zipIT = App.Path & "winzip32 -a" unzipIT = App.Path & "winzip32 -e " If zip = True Then Shell (zipIT & target & source) Else: Shell (unzipIT & target & source) End If End Function
Note :
winzip doesn't recognize spaces
__________________
Don't ask what your country can do for you, ask what you can do for your country...
Reply With Quote
  #3  
Old 11-16-2004, 04:19 AM
Flyguy's Avatar
Flyguy Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 18,885
Default

Compression Index on vbAccelerator
Reply With Quote
  #4  
Old 11-16-2004, 05:10 AM
Hugh Lerwill Hugh Lerwill is offline
Junior Contributor
 
Join Date: Oct 2004
Posts: 292
Default

Quote:
Originally Posted by Newhire
Hi all,

I'm developing one tool which read & modify files inside the zip file.

If you know how to do it, please tell me.

Thanks a lot for your help!

New hire
As pointed out by FlyGuy the free InfoZip utilities will do what you need.
You can use the utilities in 2 ways;

1. Use the InfoZip dlls or
2. Shell out to the InfoZip Zip.exe and UnZip.exe in a similar manner to that described by OMID SOFT for WinZip.

I personally distribute Zip.exe and Unzip.exe with my apps and use the second method. I could not get the dll approach to work reliably, or more precisely I could get it to work but it seemed over reliant on the versions of the .dlls used.

regards
Reply With Quote
  #5  
Old 11-17-2004, 09:20 PM
Newhire Newhire is offline
Newcomer
 
Join Date: Oct 2004
Posts: 24
Default Zip!

All pros,

Thanks a lot for your support. I've already done it by using Winzip 9.0 Command line support like Omid Soft.

But I think it'll be better when I use dll included my code like Fly Guy advise.

Thanks again all pros. I love this forum so much!!!

New hire.
__________________
Money is not problem, just no money is a big problem
Reply With Quote
  #6  
Old 02-12-2005, 01:36 AM
eyes eyes is offline
Regular
 
Join Date: Feb 2005
Posts: 52
Default

hi

I can't get the info zip dll to work. i followed the instructions and placed the dll in the system32 folder. can help? the error msg is "object variable or with block variable not set"

Otherwise, when can i download the unzip.exe? want to try the shell out method too

thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->