?
Solved

Using a variable to store files in the Application Directory?

Posted on 2014-10-15
2
Medium Priority
?
99 Views
Last Modified: 2014-10-16
My application has functionality where it can store PDF files within a directory called "Certificates" somewhere inside the App directory structure. My question is, where would be the best place to store "Certificates" that will always be where it should be regardless of where on a drive the application is installed? Also, how do I access that directory within my VB.Net code. I've done this once before but it's been awhile and I don't remember what the object is to accomplish this.

Thanks!
0
Comment
Question by:BlakeMcKenna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 2000 total points
ID: 40383330
You can use Application.StartupPath within your application to determine the path where your executable is on the drive, then your would append the string "\Certificates" to it to get your path for where to store your PDFs.
0
 

Author Closing Comment

by:BlakeMcKenna
ID: 40384117
Thanks Paul...that's what I was looking for.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

771 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