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:

Inventory Adjustment SOLUTION (2000) problems with 2 tags (1997) ShowIf variables (1997) bye bye tax rate (1998) [cart] not being interpreted inside [founditems] (1997) Connect to MySQL (2002) [shownext max=?] armed (1997) Sendmail Recipients (2001) Re2: Calculating multiple shipping... (1997) web delivery (1997) Sorting (1998) ReturnRaw, download link for mov (2007) changing prices in cart (1997) problems with WebCat-Plugin () Plugin or CGI or both (1997) Secure Cookies (2008) Add command creates new cart but I'm passing existing cart...? (2000) A helpful tip to avoid pulling an Aaron (2000) Where is f2? (1997) [WebDNA] Quick grep... Govinda?? (2010)