Solved

PKUNZIP  Shell

Posted on 1997-11-06
1
526 Views
Last Modified: 2008-03-17
Hi
I am using this for unzipping, but am having a prob.
It unzips ok, but in the VB5 main directory, though the file3.path is another.
How can I control the destination directory??
The code goes here;

      filnavn = File3.Filename
      f = FreeFile
          Open filnavn For Random As f
       c = Shell("pkunzip.exe " & File3.Path & "\" & filnavn, vbHide)


'Jacob.
0
Comment
Question by:CATT
1 Comment
 
LVL 6

Accepted Solution

by:
anthonyc earned 70 total points
ID: 1440063
pkunzip syntax is:

pkunzip.exe [flags] zipfile [output path]

If the output path is not there, it sends the files to the current path, which is the vb5 main dir.  To cure this:

c = shell("pkunzip.exe " & file3.path & "\" & fillnavn & " " & file3.path, vbHide)


On anothe rnote, why did you open the zip file for random access?   you dont need to do that unless you intend on reading the zip file directly
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question