Re: searching for last file in a directory

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 22571
interpreted = N
texte = >>>Has anyone a handy solution for displaying the last file >>>(alphabetically) in a given subdirectory? >>>afolder/01.pic >>>afolder/02.pic >>>afolder/03.pic >>>afolder/04.pic <-- this one needs to be displayed >> >> >>[ListFiles] >>[TEXT]lastFile=[FileName][/TEXT] >>[/ListFiles] >>The file you want to display is: [lastFile] > > >But this should only work in 3.0, otherwise you have to >store the filenames in a temporary database >(i like the 3.0 solution better ;-) There are other ways to do it without using a temporary database, and without using version 3.0. Here's a technique that's relatively easy and also version 2.x compliant: [listfiles][showif [math]item[/math]=[index]][filename][/showif][/listfiles]Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: searching for last file in a directory (Kenneth Grome 1999)
  2. Re: searching for last file in a directory (Martin Bech 1999)
  3. Re: searching for last file in a directory (Christer Olsson 1999)
  4. searching for last file in a directory (Matthias Precht 1999)
>>>Has anyone a handy solution for displaying the last file >>>(alphabetically) in a given subdirectory? >>>afolder/01.pic >>>afolder/02.pic >>>afolder/03.pic >>>afolder/04.pic <-- this one needs to be displayed >> >> >>[listfiles] >>[text]lastFile=[FileName][/TEXT] >>[/ListFiles] >>The file you want to display is: [lastFile] > > >But this should only work in 3.0, otherwise you have to >store the filenames in a temporary database >(i like the 3.0 solution better ;-) There are other ways to do it without using a temporary database, and without using version 3.0. Here's a technique that's relatively easy and also version 2.x compliant: [listfiles][showif [math]item[/math]=[index]][filename][/showif][/listfiles]Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Almost a there but..bye bye NetCloak (1997) [WebDNA] Did everything in ReadMe.txt and it still doesn't work (2013) ASP and Web DNA (1998) Change in Host? (1999) Server slowing down. (1997) Summary search -- speed (1997) Speed Optimization - Mac (1997) multiple db's (2003) Re2: AAgghh!! Help, please. SSL strikes again. (1997) Images in WebCat (2000) Re[2]: 2nd WebCatalog2 Feature Request (1996) Running _every_ page through WebCat ? (1997) OT: Writing help files (2003) [WebDNA] how to clear the [username] and [password] values the browser has stored? (2008) Serving images from databases (1998) [WebDNA] if - combining OR and AND (2008) append=T problem (1998) New York City sales tax database needed (1997) OT: Unix Find Question (2004) authenticating a second user (1997)