473,385 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Vbscript that automates an unzip operation

28
Hi,

I am working on a project that retrieves a zip file via ftps from a server using an automated script and I wanted to write vbscript script that automates the unzip operation. So far I got this script but it only creates an empty target folder and there are no files. Please help. I have included the zip file i am working with.
Attached Files
File Type: zip DDAP.SPRD.JCH.E.zip (291.8 KB, 86 views)
File Type: txt Extract EOD.txt (746 Bytes, 265 views)
Feb 11 '12 #1

✓ answered by Guido Geurs

You must open a shell and follow the rules for the commandline of the program.

For Winzip it's= program command ZIPfile Folder
(command for extract => -e)


Expand|Select|Wrap|Line Numbers
  1. 'Calling unzip function 
  2. Set WshShell = WScript.CreateObject("WScript.Shell") 
  3. WshShell.Run  """C:\Program Files\WinZip\WZUNZIP.EXE""" & " -e " & """E:\xfer4\DDAP.SPRD.JCH.E.zip""" & " " & """E:\xfer4""" 
This will extract all the files from "E:\xfer4\DDAP.SPRD.JCH.E.zip" to the folder "E:\xfer4"

2 3194
Guido Geurs
767 Expert 512MB
You must open a shell and follow the rules for the commandline of the program.

For Winzip it's= program command ZIPfile Folder
(command for extract => -e)


Expand|Select|Wrap|Line Numbers
  1. 'Calling unzip function 
  2. Set WshShell = WScript.CreateObject("WScript.Shell") 
  3. WshShell.Run  """C:\Program Files\WinZip\WZUNZIP.EXE""" & " -e " & """E:\xfer4\DDAP.SPRD.JCH.E.zip""" & " " & """E:\xfer4""" 
This will extract all the files from "E:\xfer4\DDAP.SPRD.JCH.E.zip" to the folder "E:\xfer4"
Feb 12 '12 #2
Rettla
28
Thanx guido, that reali helped. I appreciate it
Feb 12 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bill | last post by:
Looking thru my books, searching the 'net - I think it's a VBScript feature. I don't know the exact operators, but it's something like: a?b:c Which translates to: If a = TRUE then return b...
2
by: bradley | last post by:
I am developing a website which allows a user to upload documents (MS Word, PDF, etc) to a folder located beneath the website root. This works fine. However, for storage space and security reasons,...
0
by: Pete Smith | last post by:
Hi, we're fighting the issue that our applicaton which automates Outlook looses connection. Does anybody know a likely cause or a good article about the Interop Services? ...
0
by: Rocky Zhou | last post by:
python unzip At first, I tried to use 'os.popen3("unzip ...") like this: fin, fout, ferr = os.popen3("unzip -o -d %s %s" % (dest, zipfile)) strerr = ferr.read() # This makes the program hanging...
7
by: Mark | last post by:
Good evening all, using a XP pro platform and Access 2003 SP2, is it possible to identify a .zip file, inflate the file and then import the contents? I'm pretty certain I could code steps 1 & 3...
3
by: Dilruba | last post by:
asp, vbscript, Ms Access I am using vbscript to insert & update ms accees. Insert operation is working , but update operation is not working. I have used the following codes: ...
2
by: wallconor | last post by:
Hi, I am having a problem using Dreamweaver CS3 standard recordset paging behavior. It doesn’t seem to work when I pass parameter values from a FORM on my search page, to the recordset on my...
5
by: MicheleG | last post by:
Hi to all! I created a VB.Net COM DLL which I can use in VBScript. I followed the steps in the following article: http://msdn2.microsoft.com/en-us/library/x66s8zcd(VS.71).aspx (I used the method...
1
BezerkRogue
by: BezerkRogue | last post by:
I have created a script that automates the launching of an application based upon a value in the registry. For some reason, it is not connecting to the database to read what application it's...
2
by: somsub | last post by:
Hi all, Here is my samle code use strict ; use warnings ; use IO::Uncompress::Unzip ; When I compiled this three lines of code in win32 I got error like below.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.