Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Command line to Zip a file

328 views
Skip to first unread message

Marc Lefebvre

unread,
Dec 1, 2005, 1:58:28 PM12/1/05
to
By default,
With windows XP there is a command line to ZIP a file ?

Thank's
Marc


Daniel Martín

unread,
Dec 1, 2005, 2:38:23 PM12/1/05
to
No, there isn't, but you can use a third party command line tool from WinZip: http://www.winzip.com/downcl.htm.

--
Greetings,
Daniel Martín


"Marc Lefebvre" <marc__lefebv...@hotmail.com> wrote in message news:%23bmJ%23kq9F...@TK2MSFTNGP11.phx.gbl...

Ramesh, MS-MVP

unread,
Dec 1, 2005, 11:54:30 PM12/1/05
to
In addition to Daniel, see below:

Posted by Torgeir Bakken.

The zip functionality that comes with WinXP/Win2k3 does not have a command
line interface.

Some free zip/unzip programs that can help you:

ZipGenius has a command line interface (freeware)
http://www.zipgenius.it/

PowerArchiver has a command line version as well:
http://www.powerarchiver.com

Last freeware version of PowerArchiver:
http://www.321download.com/LastFreeware/

--
Ramesh, Microsoft MVP
Windows XP Shell/User

Windows XP Troubleshooting
http://www.winhelponline.com


"Marc Lefebvre" <marc__lefebv...@hotmail.com> wrote in message
news:%23bmJ%23kq9F...@TK2MSFTNGP11.phx.gbl...

David Candy

unread,
Dec 2, 2005, 12:40:34 AM12/2/05
to
CreateBlankZip.vbs FileName.zip
==========================
Set Ag=Wscript.Arguments
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(Ag(0), 8, vbtrue)
BlankZip = "PK" & Chr(5) & Chr(6)
For x = 0 to 17
BlankZip = BlankZip & Chr(0)
Next
ts.Write BlankZip

Unzip.vbs SrcFldr DestFldr
eg, unzip "C:\..\My Documents" "C:\MyZip.zip"
It doesn't matter if the source is a zip and dest is a folder EXCEPT it only works zipping if there is a msgbox as the last statement. Dunno why. Msgbox is not needed if unzipping. I think it's an object reference thing and zipping is slow. Both Folders/Zips must exist.
===================================
Set objShell = CreateObject("Shell.Application")
Set Ag=Wscript.Arguments
set WshShell = WScript.CreateObject("WScript.Shell")

Set DestFldr=objShell.NameSpace(Ag(1))
Set SrcFldr=objShell.NameSpace(Ag(0))
Set FldrItems=SrcFldr.Items
DestFldr.CopyHere FldrItems, &H214
Msgbox "Finished"


--
--------------------------------------------------------------------------------------------------
Read David defending the concept of violence.
http://margokingston.typepad.com/harry_version_2/2005/10/entering_the_ga.html#more
=================================================


"Marc Lefebvre" <marc__lefebv...@hotmail.com> wrote in message news:%23bmJ%23kq9F...@TK2MSFTNGP11.phx.gbl...

Torgeir Bakken (MVP)

unread,
Dec 3, 2005, 1:32:29 PM12/3/05
to
Marc Lefebvre wrote:

> By default,
> With windows XP there is a command line to ZIP a file ?
>

Hi,

The zip functionality that comes with WinXP/Win2k3 does not have
a command line interface.

Some free zip/unzip programs that can help you:

ZipGenius has a command line interface (freeware)
http://www.zipgenius.it/

PowerArchiver has a command line version as well:
http://www.powerarchiver.com

Last freeware version of PowerArchiver:
http://www.321download.com/LastFreeware/


--
torgeir, Microsoft MVP Scripting, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

0 new messages