Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-11-10
3
Medium Priority
?
197 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

877 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