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

  • Thread starter Thread starter John
  • Start date Start date
J

John

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.
 
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
 
Back
Top