Login | |
|
 |
RE: ZIP'ing in WinXP natively - 10/20/2005 4:08:15 AM
|
|
 |
|
| |
sethsdad
Posts: 115
Score: 0
Joined: 4/4/2005
From: USA
Status: offline
|
Can you use ASP? That seems to be the only route available in VBS.
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/20/2005 5:07:22 AM
|
|
 |
|
| |
Cybex
Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
|
I know nothing about ASP. Is support native? Is it anything similar to VBS? I am not against learning a new trick here and there. Cybex
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/20/2005 5:23:17 AM
|
|
 |
|
| |
Snipah
Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
Hiya Cybex... So far i have found a VB.NET version of some script.... (DynaZIP) quote:
ORIGINAL Innermedia.com about DynaZip Max Secure Microsoft chooses DynaZip as the compression engine inside Windows XP ‘ A simple VB.Net subroutine using DynaZip Max Secure to ‘ zip up some files and record a result code Private Sub Zip_It(strZipFile As String, strItemsToZip As String) ' Create an instance of the DynaZip Max Secure .NET assembly Dim dzn As CDZipSNET dzn = New CDZipSNET() ' Set the name of the zip file you want to create dzn.ZIPFile = strZipFile ' Set the File Items to be zipped dzn.ItemList = strItemsToZip ' Tell DynaZip Max Secure to start zipping up the files dzn.ActionDZ = CDZipSNET.DZACTION.ZIP_ADD ' Check for errors and display or record result If (dzn.ErrorCode <> CDZipSNET.ZIPRESPONSE.ZE_OK) Then ‘ Display Error condition if desired End If strResult = dzn.ErrorCode.ToString() End Sub
_____________________________
For more information, please see the "Read me First" topic. http://www.visualbasicscript.com
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/20/2005 6:04:52 AM
|
|
 |
|
| |
Cybex
Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
|
Good job. Do you think this means that it can only be accomplished via VB and not through VBS? Cybex
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/20/2005 6:10:22 AM
|
|
 |
|
| |
Snipah
Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
I read in their manuals that if you'd install their product (so not the baked MS version) then there are some examples of zipping thru ASP (ASP uses VBScript for 99%) in their \Scripts\ASP\VBScript folder.... You could go to the site, download it (DynaZIP MAX Secure) and see how it looks...(link is in my previous post) Snipah
_____________________________
For more information, please see the "Read me First" topic. http://www.visualbasicscript.com
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/20/2005 6:26:47 AM
|
|
 |
|
| |
sethsdad
Posts: 115
Score: 0
Joined: 4/4/2005
From: USA
Status: offline
|
another thought - if you're going to stay in "native" XP, you could possibly launch a new instance of explorer.exe and feed it the information to create the "compressed folder".
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/20/2005 6:29:20 AM
|
|
 |
|
| |
Snipah
Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
compressed ZIP you mean? You cannot use FSO to create a zip (and feed explorer)...could you elaborate some more on that?
_____________________________
For more information, please see the "Read me First" topic. http://www.visualbasicscript.com
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/20/2005 11:27:31 PM
|
|
 |
|
| |
sethsdad
Posts: 115
Score: 0
Joined: 4/4/2005
From: USA
Status: offline
|
The thought was this: since Cybex can't use "non-native" software (IE WINZIP, downloaded DOS Shell PKZIP), I was thinking that he could open a new instance of explorer and feed it a script like perhaps explore.exe < makeazip.txt. Probably just a pipe dream.
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/21/2005 3:43:46 AM
|
|
 |
|
| |
Cybex
Posts: 412
Score: 0
Joined: 9/14/2005
From: Florida
Status: offline
|
I tried to follow the code but I got lost... Line 3, "If WScript.Arguments.Count = 0 Then WScript.Quit" does not seem to "End If" and if you try to it errors out. This is new to me. Are there situations where VBS will accept this? I see it WScript but I guess I am missing where the path varaible is being declared. Is the path variable considered to be the location of the script? Sorry I am new as well and I am having a hard time following this. When I run it I do not get an error, I get nothing. Cybex
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/21/2005 3:47:04 AM
|
|
 |
|
| |
sethsdad
Posts: 115
Score: 0
Joined: 4/4/2005
From: USA
Status: offline
|
End If is implied here, not required for a single line if Could have been coded (for a purist) as If WScript.Arguments.Count = 0 Then WScript.Quit end if
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/21/2005 3:49:31 AM
|
|
 |
|
| |
ebgreen
Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
|
One line if then statements are acceptable. Try this to see: strTest = "Foo" if strTest <> "Foo" Then WScript.Echo "You should not see this message" if strTest = "Foo" Then WScript.Echo "You should see this one fine" As for path being declared, I don't see a path variable in that code?
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/21/2005 4:20:19 AM
|
|
 |
|
| |
Snipah
Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
The one-line If is the exception where no End If is required... the path is defined by the arguments....
_____________________________
For more information, please see the "Read me First" topic. http://www.visualbasicscript.com
|
|
| |
|
|
|
 |
RE: ZIP'ing in WinXP natively - 10/21/2005 12:38:34 PM
|
|
 |
|
| |
TNO
Posts: 1074
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
JavaScript befuddles my brain sometimes. The original script was in a japanese website. I tried to translate and debug as well as I could.
_____________________________
To iterate is human, to recurse divine. -- L. Peter Deutsch
|
|
| |
|
|
|
|
|