PC Review


Reply
Thread Tools Rate Thread

Console app & Base path

 
 
ThunderMusic
Guest
Posts: n/a
 
      9th Jan 2007
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


 
Reply With Quote
 
 
 
 
ThunderMusic
Guest
Posts: n/a
 
      9th Jan 2007
I found it in the Environment properties.

Thanks

"ThunderMusic" <(E-Mail Removed)> wrote in message
news:%23yXLEy$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I received Exception from HRESULT: 0xE06D7363 errorwhile using Interop.Fredi.dll in Console base C# .NET project Vimal Thakkar Microsoft C# .NET 0 30th Apr 2007 12:30 PM
Re: Base File Path on Text Box Albert D. Kallal Microsoft Access Form Coding 1 18th Jan 2007 03:17 AM
Console app & Base path ThunderMusic Microsoft Dot NET Framework 1 9th Jan 2007 03:02 PM
Console app & Base path ThunderMusic Microsoft Dot NET 1 9th Jan 2007 03:02 PM
Changing a path on a split data base =?Utf-8?B?Qm9iIEI=?= Microsoft Access 9 5th Jan 2006 05:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:53 AM.