471,071 Members | 1,325 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

Interesting one : Retrieve a list of files within a web folder

Hi all,

I haven't a clue where to begin here (or more to the point - if it's even
possible).

I need to read the names of all the files inside a folder off my web site.
The catch here is that I don't know the absolute path here
(C:\inetpub\whatever\whatever\etc...) as it could be on any drive at my ISP.

Is there a way to retrieve a list of these files by somehow using the
relative path (../Images/photos/*)?

Regards
John.
Nov 18 '05 #1
2 1634
use
server.mappath("images/photos/")
"John" <a@b.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi all,

I haven't a clue where to begin here (or more to the point - if it's even
possible).

I need to read the names of all the files inside a folder off my web site.
The catch here is that I don't know the absolute path here
(C:\inetpub\whatever\whatever\etc...) as it could be on any drive at my
ISP.

Is there a way to retrieve a list of these files by somehow using the
relative path (../Images/photos/*)?

Regards
John.

Nov 18 '05 #2
Hrm, using VB.Net as follows:

Server.MapPath("../Images/photos") will give you the absolute path.

Hope that helps :)

Also, I believe the relative path may work also...maybe not.

Mythran
"John" <a@b.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi all,

I haven't a clue where to begin here (or more to the point - if it's even
possible).

I need to read the names of all the files inside a folder off my web site.
The catch here is that I don't know the absolute path here
(C:\inetpub\whatever\whatever\etc...) as it could be on any drive at my
ISP.

Is there a way to retrieve a list of these files by somehow using the
relative path (../Images/photos/*)?

Regards
John.

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by kafooey | last post: by
7 posts views Thread by MAK | last post: by
4 posts views Thread by aaj | last post: by
2 posts views Thread by AAJ | last post: by
1 post views Thread by shank | last post: by
Jacotheron
1 post views Thread by Jacotheron | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.