Solved

Find file in sub directories

Posted on 2013-05-15
3
262 Views
Last Modified: 2013-05-16
I would like a VB.Net or even VBA script that looks on the C:\ drive for an executeable and then sets a string variable to that path.

The search would be confined to the following folders AND their sub folders
 C:\Program Files\ or C:\Program Files (x86)\

Once file is found it stops

myExecuteablePath = "foundFullPath"
0
Comment
Question by:lrbrister
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 250 total points
ID: 39169501
oh you will need this..

see the code and instruction from this link

http://allenbrowne.com/ser-59.html
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 250 total points
ID: 39170871
For VB.NET, use Directory.GetFiles and check the count

http://msdn.microsoft.com/en-us/library/ms143316.aspx
0
 

Author Closing Comment

by:lrbrister
ID: 39171159
Thanks folks!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

810 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