Create a zip file

Access9001

Registered User.
Local time
Today, 15:15
Joined
Feb 18, 2010
Messages
268
I have a loop that iterates through files -- how can i create a zip file containing everything within this loop?
 
Hmm probably use the Shell command to run winzip and create the zip file, then in the loop use another shell command to add the files you want to the zip.
 
How would I do this in terms of syntax?

Say I have a string, filepath = the path of the file I wish to add to a zip, zippath.
 
Look in the help file chap! You're on the right track with having the path in a string. You'll also need to know the command line syntax for your compression program (there's one that comes with DOS called compact - type compact /? |more at the command line)
 
What you may need to do is when iterating through the folder is to move all the required field to a temp folder and then zip up the folder itself.
 
Is there an easy way to zip a folder? Google is not helping much
 
Try typing compact /? |more at a command line to learn more about the MS compression program, as per my previous post.
 
Didn't know that. I've got winRAR installed on this machine, and I use Compact daily - no problems.... maybe Winzip is different.
 
I have attached a demo of using a dll to zip files/folders in one command line. I am oing to post it in the samples forum later. here is a sneak preview. It's an old one but it works.

Remember to read the how to file first.
 

Attachments

Users who are viewing this thread

Back
Top Bottom