PDA

View Full Version : cmd zipping



Michael Clease
01-05-2008, 23:23
Does anyone know if you can use the builtin compression in XP from the command line?

I was thinking of writing a batch file that grabbed some files copied to another directory then zipped that directory, this is to be done on a machine that doesnt have winzip installed (which i know has command line functions) I can not install any other software.

even if its a trick to use the SENDTO that would do.

anyone

PS i dont want to use TB for this.
PPS found this inside zipfldr.dll which could help



Signature="$CHICAGO$"
[RegAlways]
AddReg=ZipFldr.RegAlways
DelReg=Delete.RegAlways
RequiredEngine=SETUPAPI,%ERR_NOSETUPAPI%
[RegTakeDefault]
AddReg=ZipFldr.RegTakeDefault
DelReg=Delete.RegTakeDefault
RequiredEngine=SETUPAPI,%ERR_NOSETUPAPI%
[Unreg]
DelReg=ZipFldr.RegAlways,ZipFldr.RegTakeDefault
[ZipFldr.RegTakeDefault]
HKCR,.zip,,,CompressedFolder
HKCR,.zip,"Content Type",,"application/x-zip-compressed"
[Delete.RegTakeDefault]
[ZipFldr.RegAlways]
HKCR,CLSID\%CLSID_ZIPFLD%,,,CompressedFolder
HKCR,CLSID\%CLSID_ZIPFLD%\DefaultIcon,,%REGEXSZ%,%_SYS_MOD_PATH%
HKCR,CLSID\%CLSID_ZIPFLD%\InProcServer32,,%REGEXSZ%,%_SYS_MOD_PATH%
HKCR,CLSID\%CLSID_ZIPFLD%\InProcServer32,ThreadingModel,,Apartment
HKCR,CLSID\%CLSID_ZIPFLD%\ProgID,,,CompressedFolder
HKCR,CLSID\%CLSID_ZIPFLD%\ShellFolder,Attributes,%REGDW%,0x200001a0
HKCR,CLSID\%CLSID_ZIPFLD%\ShellFolder,UseDropHandler,,
HKCR,.zip\OpenWithProgids,CompressedFolder
HKCR,.zip\CompressedFolder\ShellNew,Data,%REGBINARY%,50,4B,05,06,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
HKCR,"Applications\zipfldr.dll",NoOpenWith,,
HKCR,CompressedFolder,,,"%COMPRESSED_FOLDER%"
HKCR,CompressedFolder,"FriendlyTypeName",%REGEXSZ%,"@%_SYS_MOD_PATH%,-10195"
HKCR,CompressedFolder\CLSID,,,%CLSID_ZIPFLD%
HKCR,"SystemFileAssociations\.zip\CLSID",,,%CLSID_ZIPFLD%
HKCR,CompressedFolder\DefaultIcon,,%REGEXSZ%,%_SYS_MOD_PATH%
HKCR,CompressedFolder\Shell\Open\Command,,,"rundll32.exe zipfldr.dll,RouteTheCall %%L"
HKCR,"CompressedFolder\shell\open",BrowserFlags,%REGDW%,0x0010
HKCR,"CompressedFolder\shell\open",ExplorerFlags,%REGDW%,0x0012
HKCR,CompressedFolder\Shell\Open\ddeexec,,,"[ViewFolder(""%%l"", %%I, %%S)]"
HKCR,CompressedFolder\Shell\Open\ddeexec,NoActivateHandler
HKCR,CompressedFolder\Shell\Open\ddeexec\application,,,"Folders"
HKCR,CompressedFolder\Shell\Open\ddeexec\ifexec,,,"[]"
HKCR,CompressedFolder\Shell\Open\ddeexec\topic,,,"AppProperties"
HKCR,CompressedFolder\shell\find,SuppressionPolicy,%REGDW%,0x00000080
HKCR,CompressedFolder\shell\find\command,,%REGEXSZ%,"%25%\Explorer.exe"
HKCR,CompressedFolder\shell\find\ddeexec,,,"[FindFolder(""%l"", %I)]"
HKCR,CompressedFolder\shell\find\ddeexec\application,,,"Folders"
HKCR,CompressedFolder\shell\find\ddeexec\topic,,,"AppProperties"
HKCR,CompressedFolder\ShellEx\ContextMenuHandlers\%CLSID_ZIPCONTEXTMENU%,,,"Compressed (zipped) Folder Menu"
HKCR,CompressedFolder\ShellEx\DropHandler,,,"%CLSID_ZipFolderDropHandler%"
HKCR,CompressedFolder\ShellEx\StorageHandler,,,"%CLSID_ZIPFLD%"
HKCR,MIME\Database\Content Type\application/x-zip-compressed,"Extension",,".zip"
HKCR,CLSID\%CLSID_ZIPDRAG%,,,"Compressed (zipped) Folder Right Drag Handler"
HKCR,CLSID\%CLSID_ZIPDRAG%\InProcServer32,,%REGEXSZ%,%_SYS_MOD_PATH%
HKCR,CLSID\%CLSID_ZIPDRAG%\InProcServer32,"ThreadingModel",,"Apartment"
HKCR,Folder\shellex\DragDropHandlers\%CLSID_ZIPDRAG%
HKCR,CLSID\%CLSID_ZIPSENDTO%,,,"Compressed (zipped) Folder SendTo Target"
HKCR,CLSID\%CLSID_ZIPSENDTO%,"FriendlyTypeName",%REGEXSZ%,"@%_SYS_MOD_PATH%,-10226"
HKCR,CLSID\%CLSID_ZIPSENDTO%\InProcServer32,,%REGEXSZ%,%_SYS_MOD_PATH%
HKCR,CLSID\%CLSID_ZIPSENDTO%\InProcServer32,"ThreadingModel",,"Apartment"
HKCR,CLSID\%CLSID_ZIPSENDTO%\DefaultIcon,,%REGEXSZ%,%_SYS_MOD_PATH%
HKCR,CLSID\%CLSID_ZIPSENDTO%\ShellEx\DropHandler,,,"%CLSID_ZIPSENDTO%"
HKCR,CLSID\%CLSID_ZIPSENDTO%,NeverShowExt
HKCR,CLSID\%CLSID_ZIPSENDTO%,NoOpen,,"%NOOPEN%"
HKCR,CLSID\%CLSID_ZIPSENDTO%,EditFlags,%REGDW%,0x00000001
HKCR,CLSID\%CLSID_ZIPCONTEXTMENU%,,,"Compressed (zipped) Folder Context Menu"
HKCR,CLSID\%CLSID_ZIPCONTEXTMENU%\InProcServer32,,%REGEXSZ%,%_SYS_MOD_PATH%
HKCR,CLSID\%CLSID_ZIPCONTEXTMENU%\InProcServer32,"ThreadingModel",,"Apartment"
HKCR,CLSID\%CLSID_ZipFolderDropHandler%,,,"Compressed (zipped) Folder DropHandler"
HKCR,CLSID\%CLSID_ZipFolderDropHandler%\InProcServer32,,%REGEXSZ%,%_SYS_MOD_PATH%
HKCR,CLSID\%CLSID_ZipFolderDropHandler%\InProcServer32,"ThreadingModel",,"Apartment"
HKCR,.ZFSendToTarget,,,CLSID\%CLSID_ZIPSENDTO%
HKLM,"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved",%CLSID_ZIPFLD%,,"%COMPRESSED_FOLDER%"
HKLM,"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved",%CLSID_ZIPDRAG%,,"Compressed (zipped) Folder Right Drag Handler"
HKLM,"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved",%CLSID_ZIPSENDTO%,,"Compressed (zipped) Folder SendTo Target"
[Delete.RegAlways]
HKCR,CLSID\%CLSID_ZIPFLD%\shellex\ExtShellFolderViews
HKCR,CompressedFolder\ShellEx\ContextMenuHandlers\%CLSID_ZIPFLD%
HKCR,CompressedFolder\Shell\Explore

matthew
01-05-2008, 23:34
I don't actually think you can but I'm not 100% sure. :-\

Back when I owned an XP laptop I tried using the built-in Zip compression from a Command Prompt but couldn't get it to work. I eventually found a post on a forum which said that Microsoft hadn't bothered to implement the feature.

kryton9
02-05-2008, 02:16
Is this sort of what you need Mike?
http://www.lockergnome.com/it/2005/11/22/windows-xp-compressed-zipped-folder/

If it is close, I am sure we can figure out how to automate it.

Are you also copying and saving over the network?

matthew
02-05-2008, 03:19
If you search on Google for the following (http://www.google.co.uk/search?q=zipfldr.dll+%2B+command.line&sourceid=navclient-ff&ie=UTF-8&rlz=1B3GGGL_enGB265GB266), you'll see that a lot of people are interested in using the Command-Line for Zip file creation.

Michael Clease
02-05-2008, 08:52
thanks guys, I did a google and found lots and lots of people trying but no one that did it :(

There is no way can install any extra software as they are not my computers (my customers).

I am sure there is a way to trick windows SENDTO to work but havent worked it out yet.

thanks

Charles Pegge
02-05-2008, 15:04
Hello Abraxas,

Here is an ancient ancient DOS pkzip circa 1993. There will probably be formats produced by XP compression that pkunzip may not be able to handle. On the other hand, XP will be able to decompress pkzipped files, so I think this will meet most of your needs.