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
www.dotnetbooks.com
"Sylvian Tam" <> wrote in message
news:...
> 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
>
>