473,395 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 1709
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: kafooey | last post by:
Hi all, I've been digging around on the newsgroups and the web for a possible answer for this problem, but have so far come up with nothing so thought I would ask here... I have the following...
7
by: MAK | last post by:
Hello everyone, I know how to add images and icons etc to dll file. What I would like to know is there is a way to add those icons on the forms during the run time from the dll or to reference it ...
2
by: Thomas Miller | last post by:
Hello, I have built a c# class library (I will call it "Assembly1"), and built an installer that installs it. It is working well. I created a new asp.net application, right-clicked on references...
4
by: aaj | last post by:
Hi all I have a group of files that I store independently in a temporary folder on the c: drive. Typical things are ini files, bitmaps, icons etc. All access to the files is hardcoded within my...
8
by: vinesh | last post by:
I have sample Asp.Net Web Application project. Let me know how to keep the files related to this project (like the webform.aspx, WebForm1.aspx.vb, WebForm1.aspx.resx) in a separate folder within a...
2
by: AAJ | last post by:
Hi all I have a few questions about file locations with VS2005, localhost WidowsXP and remotehost Server2003, and I wonder if anyone can help me get started 1) If I build a web site on my...
1
by: shank | last post by:
I borrowed the below code from http://www.brainjar.com/asp/dirlist/ and cannot get it to read my folder files. I don't get any errors or any output to screen. I have the below folder permissions...
4
by: sam | last post by:
Hi all, Kindly have a look to the code given below ***************************************************************************** Public Function CountFiles(strDir As String, Optional SubDir As...
1
Jacotheron
by: Jacotheron | last post by:
Hi all I need a php script that can access a folder on the server to list all the files in the folder. While trying to get a solution, I found this script that can list folders in the wamp...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.