?
Solved

Find file in sub directories

Posted on 2013-05-15
3
Medium Priority
?
290 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1000 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 1000 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

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 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