Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > File Listing

Reply
Thread Tools

File Listing

 
 
Marco Pais
Guest
Posts: n/a
 
      09-08-2006
Hi there.

First of all, sorry for my poor english.

I have a problem that I don't know how to resolve. I want to make a dynamic
image gallery. With an ASP script, I will read the images from a folder and
display them on a table, for example. The script is something like this:

<%@ Language=VBScript %>
<HTML>
<BODY>
<%
Dim objFileScripting, objFolder
Dim filename, filecollection, strDirectoryPath, strUrlPath
strDirectoryPath="c:\inetpub\scripts\"
strUrlPath="\scripts\"

'get file scripting object
Set objFileScripting = CreateObject("Scripting.FileSystemObject")
'Return folder object
Set objFolder = objFileScripting.GetFolder("c:\inetpub\scripts\")
'return file collection In folder
Set filecollection = objFolder.Files
'create the links
For Each filename In filecollection
Filename=right(Filename,len(Filename)-InStrRev(Filename, "\"))
Response.Write "<A HREF=""" & strUrlPath & filename & """>" & filename
& "</A><BR>"
Next
%>
</BODY>
</HTML>

This one is not finihed yet (read only images and display them on a table).
But my problem is this: what can I do so I can read 10 files each time,
separated in several pages. So, if I have 100 image files in my folder, I
will have 10 pages, each one with a table conatining 10 images.

Thanks for any help.

Regards,

Marco Pais


 
Reply With Quote
 
 
 
 
Mike Brind
Guest
Posts: n/a
 
      09-08-2006

Marco Pais wrote:
> Hi there.
>
> First of all, sorry for my poor english.
>
> I have a problem that I don't know how to resolve. I want to make a dynamic
> image gallery. With an ASP script, I will read the images from a folder and
> display them on a table, for example. The script is something like this:
>
> <%@ Language=VBScript %>
> <HTML>
> <BODY>
> <%
> Dim objFileScripting, objFolder
> Dim filename, filecollection, strDirectoryPath, strUrlPath
> strDirectoryPath="c:\inetpub\scripts\"
> strUrlPath="\scripts\"
>
> 'get file scripting object
> Set objFileScripting = CreateObject("Scripting.FileSystemObject")
> 'Return folder object
> Set objFolder = objFileScripting.GetFolder("c:\inetpub\scripts\")
> 'return file collection In folder
> Set filecollection = objFolder.Files
> 'create the links
> For Each filename In filecollection
> Filename=right(Filename,len(Filename)-InStrRev(Filename, "\"))
> Response.Write "<A HREF=""" & strUrlPath & filename & """>" & filename
> & "</A><BR>"
> Next
> %>
> </BODY>
> </HTML>
>
> This one is not finihed yet (read only images and display them on a table).
> But my problem is this: what can I do so I can read 10 files each time,
> separated in several pages. So, if I have 100 image files in my folder, I
> will have 10 pages, each one with a table conatining 10 images.
>


This thread from a few months back should give you a starting point:

http://groups.google.co.uk/group/mic...90ca1251be50cc

--
Mike Brind

 
Reply With Quote
 
 
 
 
McKirahan
Guest
Posts: n/a
 
      09-08-2006
"Marco Pais" <marco.pais@[IGNORE]gmail.com> wrote in message
news:(E-Mail Removed)...
> Hi there.
>
> First of all, sorry for my poor english.
>
> I have a problem that I don't know how to resolve. I want to make a

dynamic
> image gallery. With an ASP script, I will read the images from a folder

and
> display them on a table, for example. The script is something like this:


[snip]

See microsoft.public.inetserver.asp.components

http://www.aspfaq.com/5003


 
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
How to prevent a file listing? paul HTML 9 08-25-2005 08:52 PM
Getting a dir and file listing of webservers sub-folders =?Utf-8?B?RGVhc3Vu?= ASP .Net 1 07-12-2005 05:05 PM
How do I override the Apache file listing? Leif K-Brooks HTML 6 12-16-2003 03:12 PM
listing in the file name in a directory in a jar file Ferman Java 4 08-13-2003 09:13 PM
Re: Text File Listing of Known Spammers? °Mike° Computer Support 2 07-29-2003 07:45 PM



Advertisments