Help with accessing data in subfolder of applicaion's folder

Posted on 2014-04-27
Medium Priority
Last Modified: 2014-04-27

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")


Question by:vcharles
  • 2
LVL 28

Accepted Solution

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

Author Closing Comment

ID: 40025928
Thank You.
LVL 28

Expert Comment

ID: 40025941
You're welcome.

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
An ASP.NET Web Form User Control is not newly introduced in ASP.NET. In fact, it was an old technology yet still playing a role to generate web content, especially when we want to use it to have a better and easy way to control part of the web conte…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
In the video, one can understand the process of resizing images in single or bulk. Kernel Bulk Image Resizer is an easy to use tool for resizing large number of images. One can add and resize multiple images with this tool in single go. The video sh…

621 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