Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Help with accessing data in subfolder of applicaion's folder

Posted on 2014-04-27
3
Medium Priority
?
186 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
[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
3 Comments
 
LVL 27

Accepted Solution

by:
MacroShadow earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 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