Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Interesting one : Retrieve a list of files within a web folder

Reply
Thread Tools

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

 
 
John
Guest
Posts: n/a
 
      10-22-2004
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.


 
Reply With Quote
 
 
 
 
Brian Hoops
Guest
Posts: n/a
 
      10-22-2004
use
server.mappath("images/photos/")


"John" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
 
Mythran
Guest
Posts: n/a
 
      10-22-2004
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
Reply

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
SOLVED - windows xp rename folder within shared folder, notrefreshing window jameshanley39@yahoo.co.uk Computer Information 0 07-30-2008 06:33 PM
How do you get a list of files from server folder to display on in a list control maglev_now@yahoo.com ASP .Net 4 10-20-2006 12:39 PM
Web Project - Unable to retrieve folder information from the server Grant Merwitz ASP .Net 0 06-21-2005 04:46 PM
list of files in a web folder Amanda H ASP General 4 02-21-2005 04:36 PM
List Files in a Web Folder J P Singh ASP General 1 09-05-2003 03:10 PM



Advertisments