Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compare when file was modified

Status
Not open for further replies.

williamsba

Programmer
Aug 3, 2000
57
US
I have a bunch of images in a folder. I made a page that reads all of the images and then displays them thumbnailed in a table. That part works great. Now I am trying to sort the images by date modified. I can get when the file was last modified no problem, but how can I compare all the files so that the last modified file will be displayed first and so on? Brad Williams
Webmaster
2d Force Service Support Group
United States Marine Corps
 
Since this sounds like a dynamic list of images and you already know how to retrieve the date modified, I would store that info (along with whatever info you need on the image, such as the path) in a variable length array. Then you can jut perform a QuickSort on the array (there are a lot of good examples of how to do a QuickSort in VB out there). Once it's sorted you just display them in the order they appear in the array.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top