Solved

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

Posted on 2006-11-10
3
189 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
Macro which automatically sends attachment to Outlook 14 81
Convert VB6 MSXML2.ServerXMLHTTP process to C# 2 65
VB6 - Convert HH:MM into Decimal 8 69
TT Auto Dashboard 13 100
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

680 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