Login | |
|
 |
RE: Windows XP and 2003 Native Zip/Unzip - 10/27/2007 4:20:46 AM
|
|
 |
|
| |
DiGiTAL.SkReAM
Posts: 1097
Score: 6
Joined: 9/6/2005
From: Florida, USA
Status: offline
|
Hokay, so I can't keep track of what I've posted and what I haven't. hehehehe Sorry. But hey, at least it isn't a 4 page advertisement for printers or cameras.
_____________________________
"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers "Would you like to touch my monkey?" - Dieter (Mike Meyers)
|
|
| |
|
|
|
 |
RE: Windows XP and 2003 Native Zip/Unzip - 10/27/2007 8:11:36 AM
|
|
 |
|
| |
dm_4ever
Posts: 2174
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
No worries man , I'm sure someone will still ask if zipping is possible with VBScript and say they can't find examples. I saw those advertisements, deleted them, and notified the poster.
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Windows XP and 2003 Native Zip/Unzip - 1/5/2008 8:07:43 AM
|
|
 |
|
| |
DiGiTAL.SkReAM
Posts: 1097
Score: 6
Joined: 9/6/2005
From: Florida, USA
Status: offline
|
To answer the two quesitons: 1) Windows Xp Compressed Folders don't include empty folders. But, as long as the empty folder is not int he root of the sourcefoler, you will be ok. For example: This won't work... fZip "c:\dev", "c:\dev.zip" with the following folder structure c:\dev c:\dev\folder1 c:\dev\This_is_an_empty_folder But, this WILL work... c:\dev c:\dev\folder1 c:\dev\folder1\This_is_an_empty_folder 2) This script was written to just add the contents of a single folder to a single zip file. I will look further into it, but just don't have the time right now.
_____________________________
"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers "Would you like to touch my monkey?" - Dieter (Mike Meyers)
|
|
| |
|
|
|
 |
RE: Windows XP and 2003 Native Zip/Unzip - 3/2/2008 5:11:17 PM
|
|
 |
|
| |
DiGiTAL.SkReAM
Posts: 1097
Score: 6
Joined: 9/6/2005
From: Florida, USA
Status: offline
|
Um, it is a function that takes two arguments. The arguments are named, oddly enough: sSourceFolder and sTargetZIPFile I'm thinking that the argument sSourceFolder is probably the source folder and that sTargetZIPFile is most likely the destination zip file. iResult = fZip("c:\myfolder", "c:\myzip.zip") If iResult <> 0 then msgbox "There was an error" end if Also, the function is commented and documented so that you could read through it and find out the info.
_____________________________
"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers "Would you like to touch my monkey?" - Dieter (Mike Meyers)
|
|
| |
|
|
|
 |
RE: Windows XP and 2003 Native Zip/Unzip - 3/2/2008 5:16:12 PM
|
|
 |
|
| |
DiGiTAL.SkReAM
Posts: 1097
Score: 6
Joined: 9/6/2005
From: Florida, USA
Status: offline
|
quote:
ORIGINAL: raygn because I could not get this to work on multiple folders into one zip at the moment I had to take the long way about doing this. I copy all files and folders I want to zip into a new folder I create and then zip this folder up it seems to work as for compressing everything up. It does however take an extremely long time to copy all the information before compressing. The script then suddenly just exists once it is done, even though it is supposed to let the user know it is complete and the zip file exists and sleep for 5 seconds to display the information before quiting. I appreciate your help and will also continue to look for a method to compress multiple folders into one zip. There are limits as to what you can access via VBScript. This is a method to utilize the built-in ZIP compression of Windows, via VBScript. of course, there are going to be methods out there that will work and give greater functionality, speed, etc. BUT, they wouldn't be native vbscript methods. They are 3rd party utils. If you are looking for something that is still not a packaged EXE, yet allows you to do this stuff via vbscript, you might consider paying a few hundred dollars for some of Chilkat's activeX objects. I hear they are great. Or, you could download and buy Winzip or WinRAR and call them from the commandline via vbscript.
_____________________________
"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers "Would you like to touch my monkey?" - Dieter (Mike Meyers)
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|