Jump to content

Zip folders from a command line


brian873

Recommended Posts

Hi,

I want to be able to zip and unzip folders in a batch command. Then copy the zip files to another location.

My question is does anybody know how to use XP’s built in zip support to do this via a command line ?

Thanks

Hail Hail

Link to comment
Share on other sites


No, it must be possible to call the DLL to do it. I think your command would look something like:

rundll32 zipfldr.dll,section 2

I don't use XP's zipping facility though, so maybe someone else who comes along can give a clearer idea.

Link to comment
Share on other sites

you could use pkzip to do it, just have to add a path to windows that points to it, just so you dont have to type the full path. I hope that helps you ;)

heres how to setup paths in windows xp/2000:

1. Go to system properties.

2. Go to the advanced tab.

3. click on Environment Variables

4. Under System Variables, look for the variable labeled "Path", and then edit it.

5. It's an easy syntax to catch on too, just seperate each path with a semi-colin ( ; ). So if you put pkzip in c:\pkzip, just add that to the rest of the paths and your all set. Good luck!

Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...

Hey Brian. I ran across your post looking for the same thing. I signed up for this forum just to comment on the responses you've received. Don't you hate it when you explicitly state the restraints you desire the solution to be within (e.g. XP's built in zip support) and people respond with stuff like "how about pkzip"? prathapml seem to be the only one who understood the question. Since there are so many dim people out there, you might have to state that you are wishing to write a script that you wish to deploy without having to depend on the destination machines already having 3rd party compression software loaded or having to load a 3rd party software yourself. Of course, even with that you may still get responses like "try using winzip" :) I'm still looking, so if I run across the answer I'll post back.

Derek

P.S.

have you tried looking at pkzip?

Link to comment
Share on other sites

Hi derekgreer

Thanks for the post. I have searched high and low for this and came up blank. I have a solution for it at the moment with third party tools but I would still like to be able to do this with an out the box XP.

Back to the search engine !

Hail Hail

Link to comment
Share on other sites

The zip folder dll is an explorer shell extension that tells windows to display zip archive as a folder, don't think you can make any use of this from command line. The zip dll itself is gzip.dll. If you find a way please PM me so I don't miss post. I would like to be able to do this as well, but I don't think its possible.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...