Console app & Base path

T

ThunderMusic

Hi,
I have a console app. I have to search for files in the directory from which
my application is run. Here's an example :

c:\MyApp>MyApp.exe param1 param2

The base path is C:\MyApp... but if I do the following :

c:\MyApp\SubDir>..\MyApp.exe param1 param2

The base path should be C:\MyApp\Subdir... Is there a way to get this
value? I tried AppDomain.CurrentDomain.BaseDirectory, but it always returns
c:\MyApp...

Please help... ;)

ThunderMusic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top