-
April 6th, 2010, 01:30 PM
#1
How to Zip a Folder
Hi ALL,
How to zip a folder through code in vb 6.0 ... the folder must be zipped along with the files/contents and sub folder inside it....
Thanks in Advance
FAYAZ.
-
April 6th, 2010, 02:17 PM
#2
Re: How to Zip a Folder
Originally Posted by FayazNizami
Hi ALL,
How to zip a folder through code in vb 6.0 ... the folder must be zipped along with the files/contents and sub folder inside it....
Thanks in Advance
FAYAZ.
As much as I remember there was a control regarding that in the web anywhere. But as much as I remember too, it wasn't working properly it has lots of bugs. Use vb.net for programs that needs something like that.
But see also here, maybe he has found a solution to use that dll
http://www.codeguru.com/vb/gen/vb_gr...icle.php/c6743
Last edited by JonnyPoet; April 6th, 2010 at 02:22 PM.
Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
-
April 6th, 2010, 02:32 PM
#3
Re: How to Zip a Folder
the ZIP format was developed by WinZip many years ago, and they patented it. Others have copied it and changed it. Windows even has a method built-in, called COMPACT, which compresses files, and if you RIGHT-CLICK, there's a SEND-TO option that uses ZIP format
C:\>COMPACT /?
Displays or alters the compression of files on NTFS partitions.
COMPACT [/C | /U] [/S[ ir]] [/A] [/I] [/F] [/Q] [filename [...]]
/C Compresses the specified files. Directories will be marked
so that files added afterward will be compressed.
/U Uncompresses the specified files. Directories will be marked
so that files added afterward will not be compressed.
/S Performs the specified operation on files in the given
directory and all subdirectories. Default "dir" is the
current directory.
/A Displays files with the hidden or system attributes. These
files are omitted by default.
/I Continues performing the specified operation even after errors
have occurred. By default, COMPACT stops when an error is
encountered.
/F Forces the compress operation on all specified files, even
those which are already compressed. Already-compressed files
are skipped by default.
/Q Reports only the most essential information.
filename Specifies a pattern, file, or directory.
Used without parameters, COMPACT displays the compression state of
the current directory and any files it contains. You may use multiple
filenames and wildcards. You must put spaces between multiple
parameters.
Last edited by dglienna; April 6th, 2010 at 02:36 PM.
-
April 6th, 2010, 03:04 PM
#4
Re: How to Zip a Folder
Originally Posted by dglienna
the ZIP format was developed by WinZip many years ago, and they patented it.
Actually I think it was PKWare I was using PKZip and PKUnzip long before I ever saw winzip.
-
April 6th, 2010, 03:15 PM
#5
Re: How to Zip a Folder
WinZip 1.0 was released in April 1991 as a shareware Windows GUI front-end for PKZIP. Earlier in January 1991 Nico Mak Computing released GUI front-end for OS/2 Presentation Manager called PMZIP. It used OS/2 versions of the PKWARE, Inc. PKZIP and PKUNZIP programs.
Starting from v5.0 in 1993 the creators of WinZip incorporated compression code from the Info-ZIP project, thus eliminating the need for the PKZIP executable to be present.
http://en.wikipedia.org/wiki/Winzip
-
April 6th, 2010, 03:43 PM
#6
Re: How to Zip a Folder
Well, I was using ARJ back then. It did what I needed, and the admin's had know idea that it could do such great compression, given enough time on a slow box...
-
April 6th, 2010, 09:56 PM
#7
Re: How to Zip a Folder
Yep. I used ARJ quite a lot also
-
April 7th, 2010, 01:06 AM
#8
Re: How to Zip a Folder
To answer the OP original Q, you can do any of the following. Go to infozip's web site and download for free the C code and create your own dll's or I believe they have them already compiled for you (don't remember???). Don't forget to read the license agreement at http://www.info-zip.org/
2. http://www.vbaccelerator.com/home/index.asp has under its vb6 section three projects for adding zip functionality. One for zipping, unzipping, and zipping vb6 projects. They have the infozip dll's compiled and ready for download and the dlls have been renamed.
3. And I'm surprised none of you have pointed the OP to this article!!! Because it is here on this website!!! http://www.codeguru.com/vb/gen/vb_gr...cle.php/c6743/ which uses the infozip's dlls
Edit: I see JohnnyPoet did link that 3rd option article...
Good Luck
-
April 12th, 2010, 06:48 AM
#9
Re: How to Zip a Folder
Originally Posted by vb5prgrmr
That is the link I always give out.
-
April 12th, 2010, 07:10 AM
#10
Re: How to Zip a Folder
Originally Posted by vb5prgrmr
Edit: I see JohnnyPoet did link that 3rd option article...
But HACK! You previously did not reply to this thread...
-
April 22nd, 2010, 06:59 AM
#11
Re: How to Zip a Folder
I have used CGZipLIbrary successfully for years - should find it by searching this forum or Google
I think its the same as http://www.codeguru.com/vb/gen/vb_gr...cle.php/c6743/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|