Solved

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

Posted on 2006-11-10
3
185 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
Comment Utility
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
Comment Utility
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
Comment Utility
You're welcome.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 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

12 Experts available now in Live!

Get 1:1 Help Now