Ask a Question related to ASP, Design and Development.
-
Sylvian Tam #1
List Image by date in ASP
Hi all,
I am using the File System Object to get a list of image through a specified
local path :
Dim fso, ffolder, ffile, fc, fproperity, strOut, strPic
Set fso = CreateObject("Scripting.FileSystemObject")
Set ffolder = fso.GetFolder(folderspec)
Set fc = ffolder.Files
For Each ffile in fc
intCount = intCount + 1
strPic = strPhotoPath & ffile.name
Set fproperity = fso.GetFile(strPic)
'show image one by one...
Next
I found that the image will be display by file name by default, is there any
way to show them by the created date or last accessed date?
Is there any way in doing this?
Thanks
Sylvian
Sylvian Tam Guest
-
inserting date in form list
I want to make a date list that lists the year but instead of adding every year on a line I want to make a loop do it at runtime....any ideas? -
display list date
I have a column in my db that lists options seperated by commas. I want to list those options in a bullet style list. How do I parse the data in... -
Event csv list and pulling by date...
Just started "playing" with php and have a question. I currently have a csv list such as this: 11-08-03 | Tournament | Chapman rules 12-18-03 |... -
Image list
Hi all, I'm developing a simple application with Project Builder using Carbon (nib based). I'd like to create a list of pictures (like tumbnails... -
Why is module list so out of date?
Does anyone know why http://cpan.org/modules/00modlist.long.html is so far out of date? $Revision: 3.112 $ $Date: 2002/08/27 23:28:18 $ -*-... -
Manohar Kamath [MVP] #2
Re: List Image by date in ASP
As you loop through the files, create a recordset with file name and file
date. Then you can sort this recordset however you want.
' Create a custom recordset
Set filesRs = Server.CreateObject("ADODB.RecordSet")
filesRs.CursorLocation = 3 ' adUseClient
filesRs.Fields.Append "FileDate", adDate
filesRs.Fields.Append "FileName", adVarChar, 255
filesRs.Open
For Each ffile in fc
intCount = intCount + 1
strPic = strPhotoPath & ffile.name
...
filesRs.AddNew
filesRs("FileDate") = CDate(ffile.CreateDate) ' Check the property
filesRs("FileName") = CStr(ffile.Name) ' Check the property
Loop
' Sort the recordset on FileDate and proceed
filesRs.Sort = "FileDate ASC"
Hope that helps.
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Sylvian Tam" <sylvian@netvigator.com> wrote in message
news:uHWp81CkDHA.2404@TK2MSFTNGP12.phx.gbl...specified> Hi all,
>
> I am using the File System Object to get a list of image through aany> local path :
>
> Dim fso, ffolder, ffile, fc, fproperity, strOut, strPic
> Set fso = CreateObject("Scripting.FileSystemObject")
> Set ffolder = fso.GetFolder(folderspec)
> Set fc = ffolder.Files
>
> For Each ffile in fc
> intCount = intCount + 1
> strPic = strPhotoPath & ffile.name
> Set fproperity = fso.GetFile(strPic)
>
> 'show image one by one...
>
> Next
>
>
> I found that the image will be display by file name by default, is there> way to show them by the created date or last accessed date?
>
> Is there any way in doing this?
>
> Thanks
> Sylvian
>
>
Manohar Kamath [MVP] Guest



Reply With Quote

