Click here to Skip to main content
15,884,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys,

I have the following scenario:

I have a directory name : Management Server

I need to find out through code where this directory is whether it is in Program Files or Program Files (x86) or on another drive on the computer

Is there a way to do this?

Thanks in advance!
Posted
Updated 13-Jun-12 0:44am
v2

Hi,

why dont you use
string[] l_dir = Directory.GetDirectories API to search out the reqd directory.
 
Share this answer
 
Do you know the program which created that directory? If not, you could follow the "Solution" described by nitin-aem which might take a very long time to execute...
But if you know it, find out
(1) that that program is installed (otherwise that folder won't exist)
(2) how that program stores its settings (some ini files, xml files, registry keys etc...) and read it from their settings
With a newer version of that program, things may change...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900