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
Solved

Help with accessing data in subfolder of applicaion's folder

Posted on 2014-04-27
3
174 Views
Last Modified: 2014-04-27
Hi,

How do I modify the code below to access the xml file in the "Data" subfolder?

xmlPath3 = System.IO.Path.Combine(Application.StartupPath, "Receiver.xml")

The code above looks for the file in the Bin/Debug folder but the xml file is in the "Data" subfolder.


I tried the code below but it does not work:

xmlPath3 = System.IO.Path.Combine(Application.StartupPath + \Data\, "Receiver.xml")

Thanks,

Victor
0
Comment
Question by:vcharles
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 40025859
xmlPath3 = System.IO.Path.Combine(Application.StartupPath & "\Data\", "Receiver.xml")
0
 

Author Closing Comment

by:vcharles
ID: 40025928
Thank You.
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 40025941
You're welcome.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

829 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