Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Relative Paths

Thread Tools

Re: Relative Paths

Posts: n/a
Andrew Wied wrote:

> Hello:
> You know, I really think this should be easy, but I cannot, for the life of me, seem to get this to work. Basically, I am looking to get a list of the file in a subdirectory of the current page's directory.
> In my application, I have a subdirectory "newXML". I want to get a list of the files in that directory.
> I have it working just fine with absolute paths, but I want it to work on relative paths.
> A snippet of my code: Dim files As String() = d.GetFiles("????????????", "*")
> I'm not sure WHAT to put into the ?????, as I've tried everything under the sun that I can think of.
> Any suggestions?
> Thanks,
> Andrew Wied

Use Server.MapPath("/pub/files") in GetFiles...
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Paths, gentleman, paths Ohad Lutzky Ruby 2 11-07-2006 02:15 AM
Relative paths on Application Error page MattC ASP .Net 1 08-24-2004 12:59 PM
Re: Relative Paths Curt_C [MVP] ASP .Net 1 05-26-2004 12:46 PM
ImageURL not accepting/working relative paths??? Kathy Burke ASP .Net 0 11-14-2003 03:22 PM
Convert between Windows style paths and POSIX style paths Noah Python 5 07-11-2003 09:25 PM