Solved

find *.zip file in App folder so i can open it

Posted on 2006-11-10
3
188 Views
Last Modified: 2010-04-30
Hello!  i'm simply needing a short and easy way of finding a zip file in the running program directory (non recursive).  the zip file gets replaced every week with a different name (it's automatically downloaded from the web) and i want to write a simple program that unzips the zip file to the current running program directory and then does some renaming of those files etc etc and then maybe copy them to another folder or whatever.  so basically just search the running program folder for a zip file and store the file name and path in a variable so i can use that variable in the unzip procedure for the next part of the program.  anyone have any good code for that?

thanks!!
0
Comment
Question by:linuxrox
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 17917023
Greetings, linuxrox.

Assuming that there's only one zip file in the folder, then this will get the job done.  If there are mutliple zip files, then this will only return the name of the first one found.

    strFilename = Dir(App.Path & "\*.zip")

Cheers!
0
 

Author Comment

by:linuxrox
ID: 17917042
yea there will just be one single zip file in there...i will open/unzip it then have the program delete the file...thanks!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 17917196
You're welcome.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

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