- Command line to Zip a file
- Posted by Marc Lefebvre on December 1st, 2005
By default,
With windows XP there is a command line to ZIP a file ?
Thank's
Marc
- Posted by Daniel Martín on December 1st, 2005
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__lefebvre_pub_NOSPAM@hotmail.com> wrote in message news:%23bmJ%23kq9FHA.2696@TK2MSFTNGP11.phx.gbl...
> By default,
> With windows XP there is a command line to ZIP a file ?
>
> Thank's
> Marc
>
>
- Posted by Ramesh, MS-MVP on December 2nd, 2005
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__lefebvre_pub_NOSPAM@hotmail.com> wrote in message
news:%23bmJ%23kq9FHA.2696@TK2MSFTNGP11.phx.gbl...
> By default,
> With windows XP there is a command line to ZIP a file ?
>
> Thank's
> Marc
>
>
- Posted by David Candy on December 2nd, 2005
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/har...e_ga.html#more
=================================================
"Marc Lefebvre" <marc__lefebvre_pub_NOSPAM@hotmail.com> wrote in message news:%23bmJ%23kq9FHA.2696@TK2MSFTNGP11.phx.gbl...
> By default,
> With windows XP there is a command line to ZIP a file ?
>
> Thank's
> Marc
>
>
- Posted by Torgeir Bakken \(MVP\) on December 3rd, 2005
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/scr...r/default.mspx