• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

Help with accessing data in subfolder of applicaion's folder

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
vcharles
Asked:
vcharles
  • 2
1 Solution
 
MacroShadowCommented:
xmlPath3 = System.IO.Path.Combine(Application.StartupPath & "\Data\", "Receiver.xml")
0
 
vcharlesAuthor Commented:
Thank You.
0
 
MacroShadowCommented:
You're welcome.
0
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now