Archived from groups: microsoft.public.windowsxp.general (
More info?)
CreateBlankZip.vbs FileName.zip
==========================
Set Ag=Wscript.Arguments
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fs
penTextFile(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"
--
--------------------------------------------------------------------------------------------------
http://webdiary.smh.com.au/archives/_comment/001075.html
=================================================
"Don Taylor" <dont@agora.rdrop.com> wrote in message news:Kq6dnc6-9oKnEr3eRVn-jg@scnresearch.com...
> "Torgeir Bakken \(MVP\)" <Torgeir.Bakken-spam@hydro.com> writes:
>>Helge Haensel wrote:
>>> What is the exe-name of the xp-zipper (WindowsXP/HE SP2).
>>> How/Can i use it in batch-mode?
>
>>The zip functionality that comes with WinXP/Win2k3 does not have
>>a command line interface.
>
> Can Scripting get fingers onto the zip functionality?
> I used your url to grope around technet and looked through
> the script center script repository in the storage/files
> areas and others but didn't find anything. Maybe I just
> didn't look in the right place, but searching for things
> like zip script didn't turn up anything relevant. Havin
> a script be able to zip a file would be very useful for me.
>
> thanks
>
>>--
>>torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
>>Administration scripting examples and an ONLINE version of
>>the 1328 page Scripting Guide:
>>http://www.microsoft.com/technet/scriptcenter/default.mspx