[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

vb.net 2.0 console application execution path

Posted on 2006-04-22
5
Medium Priority
?
385 Views
Last Modified: 2008-01-09
I want to know how to get reference to the current directory of my console app.  I have a file i want to access and dont want to have the location be hard coded.

0
Comment
Question by:ibidata
  • 2
  • 2
5 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 16515431
See Environment.CurrentDirectory Property.
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 2000 total points
ID: 16515441
BTW, if you want to open file in current directory, you can open it using only name without path.
0
 
LVL 14

Expert Comment

by:PockyMaster
ID: 16518937
Application.StartupPath() will work as well
0
 
LVL 14

Expert Comment

by:PockyMaster
ID: 16518939
Oops.. console application.. nothing said :D
0
 

Author Comment

by:ibidata
ID: 16520997
cool, thanks!  FYI for anyone in the future, current directory = bin\debug (for development at least)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month19 days, 5 hours left to enroll

834 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