Any way to create/modify zip files?

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
3,440 views 4 replies
Reply #1 Top
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
Reply #2 Top
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










Reply #4 Top
Hope that's helpful!


Very cool!


Posted via WinCustomize Browser/Stardock Central