Console app & Base path

  • Thread starter Thread starter ThunderMusic
  • Start date Start date
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
 
Back
Top