Any way to create/modify zip files?

Monday, July 10, 2006 by frasej | Discussion: DesktopX

Okay, here comes another, probably stupid, question. Is there any mechanism for DesktopX scripts to create/access/modify zip files? I've written a backup program, which works well enough for disk to disk backups. The next logical step in its evolution, however, is to be able to have compressed backups.

Jay
Chris TH
Reply #1 Tuesday, July 11, 2006 1:35 AM
Here's a Yahoo (formerly Konfabulator) widget that does zipping http://www.widgetgallery.com/view.php?widget=37655. It uses a freeware commandline zip utility (7zip?) to do the actual work by calling the executable.

Maybe it's of some use?


Posted via WinCustomize Browser/Stardock Central
rabidrobot
Reply #2 Saturday, July 15, 2006 12:43 PM
XZip is a free "component" dll that provides easy basic zip access from script. I used it to extract and create bootskin archives with Bootskin Buddy.

There are examples on how to use XZip at the download site. But here's a couple handy snippets for registering and unregistering the dll silently from your widget or gadget:

Include the XZip.dll as a Custom File from Summary panel so it will be packaged and present in the Object.Directory.

To register in your Object_OnScriptEnter:

'Register The Zip-Archive extraction/Compression DLL
Set objShell = CreateObject("WScript.shell")
strDLLPath = Chr(34) & Object.Directory & "XZip.dll" & Chr(34)
xyz = objShell.Run("regsvr32 -s " & strDLLPath, 0, False)
Set objShell = Nothing


It is important to note the space after the "-s".

To unregister the dll (if you don't think any other apps are using it!):

'Un-Register The Zip-Archive extraction/Compression DLL
Set objShell = CreateObject("WScript.shell")
strDLLPath = Chr(34) & Object.Directory & "XZip.dll" & Chr(34)
xyz = objShell.Run("regsvr32 -u -s " & strDLLPath, 0, False)
Set objShell = Nothing



Hope that's helpful!
rr










frasej
Reply #3 Sunday, July 16, 2006 11:12 PM
It was. Thank you.
ZubaZ
Reply #4 Monday, July 17, 2006 8:00 AM
Hope that's helpful!


Very cool!


Posted via WinCustomize Browser/Stardock Central

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01