Solved

PKUNZIP  Shell

Posted on 1997-11-06
1
512 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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now