[WebDNA] listfiles problem
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 106590
interpreted = N
texte = HiI have a folder of images that are named in the format...random_names-XXX.jpgWhere XXX is a serial number for a record in a databaseI don't know what the 'random_names' bit is but it doesn't contain anything other than letters an underscores. The filename always ends in hyphen serial number .jpgWhen I pull a record from the database I want to do a listfiles on the image folder and see if one of them ends in the serial number.Using...[listfiles path=images&name=-[serialno].jpg&exact=f]
[/listfiles]...works fine when I have a matching image but I get an error message if there is no matching image file like...An unknown error occurred:FileNotFound-30.jpgI've tried hiding the listfiles inside a showif with another listfiles but it doesn't work, the error still shows...[showif [listfiles path=images&name=-[serialno].jpg&exact=f][isfile][/listfiles]=T][listfiles path=images&name=-[serialno].jpg&exact=f]
[/listfiles][/showif]...I'm on WebDNA 6.0a on Mac OS X Server 10.4.11What am I doing wrong here? Shouldn't [listfiles] just show nothing is it doesn't find a match?Paul
Associated Messages, from the most recent to the oldest:
HiI have a folder of images that are named in the format...random_names-XXX.jpgWhere XXX is a serial number for a record in a databaseI don't know what the 'random_names' bit is but it doesn't contain anything other than letters an underscores. The filename always ends in hyphen serial number .jpgWhen I pull a record from the database I want to do a listfiles on the image folder and see if one of them ends in the serial number.Using...[listfiles path=images&name=-[serialno].jpg&exact=f]
[/listfiles]...works fine when I have a matching image but I get an error message if there is no matching image file like...An unknown error occurred:FileNotFound-30.jpgI've tried hiding the listfiles inside a showif with another listfiles but it doesn't work, the error still shows...[showif [listfiles path=images&name=-[serialno].jpg&exact=f][isfile][/listfiles]=T][listfiles path=images&name=-[serialno].jpg&exact=f]
[/listfiles][/showif]...I'm on WebDNA 6.0a on Mac OS X Server 10.4.11What am I doing wrong here? Shouldn't
[listfiles] just show nothing is it doesn't find a match?Paul
Paul Willis
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:
Multiple Ad databases? (1997)
[WebDNA] Security best practice (2009)
Forcing a NEWCART (1997)
[BULK] [WebDNA] AJAX module (2012)
Applescript error (1998)
Frames and WebCat (1997)
Sending E-mail (1997)
WebCatalog/Mac 2.1b2 - PIXO (1997)
math on date? (1997)
Rhapsody? (1997)
Search Engines (2000)
WebCat2.0b15-to many nested [xx] tags (1997)
Re:[input] context - solved - Thanks! (1999)
WebCat2 - storing unformatted date data? (1997)
docs for WebCatalog2 (1997)
Re[2]: 2nd WebCatalog2 Feature Request (1996)
Re[2]: New syntax feedback for 4.0 (2000)
SQL Changes in 3.0.7? (2000)
Bug Report, maybe (1997)
Multiple fields on 1 input (1997)