Get directory from file path in vb.net




















Please Sign up or sign in to vote. See more: path. Posted Jun am svknair. Add a Solution. Top Rated Most Recent. Accept Solution Reject Solution. It sounds like you are running your application in debug mode in Visual Studio.

In that case, the root path for your application is the debug folder. That is where your exe file is that you are running. If you want to include a directory in your application that has reports, you need to add that to your project or you need to create it manually.

When you create a setup project to deploy your application, you will have the option of adding folders at the root of your application. If you are including files that go with your project, put them in a folder in your application and mark them as content files that should always be copied.

Then, when you compile your application, it will create that folder and put those content files in the folder. Then you can reference them using the relative path.

End Sub. Public Sub Display message As String. WriteLine message. Print message. Was this article helpful? Posted in: Console , VB. NET Tags: get files , vb. Leave a Reply Cancel reply. Console , VB. C , Console. Hi, I'm a software engineer. I write articles about programming and design in my spare time. Ahmad Mageed Ahmad Mageed Xardax99 Xardax99 1 1 silver badge 6 6 bronze badges.

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Get VB. Skip to main content. Start your free trial. Name Directory.



0コメント

  • 1000 / 1000