[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:
Include a big block of text (1997)
ShowNext Questions (2000)
b12 cannot limit records returned and more. (1997)
A quickie question (1997)
fckeditor in Browswer html editor (2005)
shipping costs (1997)
Need help... (1997)
WebCommerce: Folder organization ? (1997)
Robert Minor duplicate mail (1997)
WebCatalog for Dummies part 2 (2000)
search form problem.. (1997)
NEVERMIND! New syntax (2000)
PIXO support (1997)
Emailer help....! (1997)
Just Testing (1997)
Associative lookup style? + bit more (1997)
Emailer port change (1997)
[BoldWords] WebCat.acgib15Mac (1997)
Date Time Oddness (1999)
ConvertChars request (1999)