Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Zip folders from a command line

- - - - -

  • Please log in to reply
13 replies to this topic

#1
brian873

brian873

    Advanced Member

  • Member
  • PipPipPip
  • 335 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


How to remove advertisement from MSFN

#2
MCT

MCT

    MSFN Junkie

  • Member
  • PipPipPipPipPipPipPipPipPip
  • 3,291 posts
  • OS:none specified
  • Country: Country Flag
i dont think u can cuz its just a dll
Posted Image Posted Image
Windows 7 32Bit 2GB Ram 120GB HDD (Laptop), Windows 8 4GB Ram 1TB HDD (Desktop) Windows XP SP3 VM with enhancements!

#3
prathapml

prathapml

    Follow the rules please :-)

  • Patrons
  • 6,791 posts
  • OS:Windows 8 x64
  • Country: Country Flag
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.
Posted ImageCheers !!!   Donate to MSFN and Help Keep This Site Running
||Please Read the Forum Rules||  Etiquette   || Welcome to MSFN - Forum Basics || Before posting
prathapml :: MSFN Supermod :: Private Message me if you ever have a problem while at MSFN

#4
ChunkDog

ChunkDog

    Your Comp, My Bitch!

  • Member
  • PipPip
  • 227 posts
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!

#5
FrankE9999

FrankE9999

    Member

  • Member
  • PipPip
  • 115 posts
You can use Info-Zip's Zip and Unzip or sometning like 7-zip.

#6
batman75

batman75

    Alive and kicking

  • Member
  • Pip
  • 58 posts
I use UHARC or 7zip for command line zipping.
Works great for me.

#7
brian873

brian873

    Advanced Member

  • Member
  • PipPipPip
  • 335 posts
Thanks everyone.... Although I am trying to do it with just the Windows software.

prathapml:

I am having a look at your idea, not much luck so far but will keep dgging.

Hail Hail

#8
cyberthug

cyberthug

    Junior

  • Member
  • Pip
  • 73 posts
pkzip software comes to mind..
i'm not sure what exactly ur trying to do.. but would winRAR's sfx help ya?

#9
brian873

brian873

    Advanced Member

  • Member
  • PipPipPip
  • 335 posts
Has anyone came up with any more ideas ?

I have not been able to find more info on this ?

hail hail

#10
derekgreer

derekgreer
  • Member
  • 1 posts
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?

#11
brian873

brian873

    Advanced Member

  • Member
  • PipPipPip
  • 335 posts
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

#12
dman

dman

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 717 posts
Are you the one preparing the zipped archives? you could compress them into ".cab" format with native "makecab" and use native "expand" command to unzip.

#13
brian873

brian873

    Advanced Member

  • Member
  • PipPipPip
  • 335 posts
Thanks Dman, that is an option although I would prefer to use the zip folder DLL to do this job.


hail hail

#14
dman

dman

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 717 posts
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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN