[LISTFILES]

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16182
interpreted = N
texte = 2.1 PI MacI have several maintainance scripts which perform actions (like MOVEFILE) on batches of cart files. Currently, I have to use [LISTFILES] to get a count of the number of files in a folder, and then go through a decrementing loop to ensure that none of the files are skipped (MOVEFILE will ruin the index order of files). Each loop requires another LISTFILES and a SHOWIF the file index = the loop index.It all works, but it's causing an enormous load on the server, causing some actions like [REPLACE] and [APPEND] to work incorrectly (or time out?).I'm not exactly sure how [LISTFILES] works, but I'm pretty sure that it doesn't cache filenames. If it does, it doesn't index by them. It would be really helpful if it *did* index by file name. This would ensure that the correct files are being hit during any actions inside a LISTFILES loop. Maybe change [LISTFILES] to [LISTFILES index=filename] (defaults to system order if no index is specified). Is this feasible?I have a similar gripe with [LINEITEMS] (it would be nice it reference a lineitem by SKU), but that hasn't caused too many problems for me.I suppose I could just write out my file list to a database and call it up from there, but I'm not too anxious to start writing out more files than I already am.MichaelMichael Winston *By Phone!: (503)/652/8815 x341 Internet Coordinator *By e-mail!: michaelw@dhorse.com Dark Horse Comics, Inc. *By web!: http://www.dhorse.com/ Associated Messages, from the most recent to the oldest:

    
  1. [WebDNA] [imagewidth] and [imageheight] don't work in [listfiles] context (Kenneth Grome 2017)
  2. Re: [WebDNA] [listfiles] error, but why? How to turn off (Govinda 2010)
  3. Re: [WebDNA] [listfiles] error, but why? How to turn off (Donovan Brooke 2010)
  4. [WebDNA] [listfiles] error, but why? How to turn off (Govinda 2010)
  5. Re: [ListFiles] Context Question ( "Jesse Crofoot" 2004)
  6. Re: [ListFiles] Context Question ( devaulw@onebox.com 2004)
  7. [ListFiles] Context Question ( "Jesse Crofoot" 2004)
  8. Re: [ListFiles] from a remote host ( John Peacock 2003)
  9. Re: [ListFiles] from a remote host ( Palle Bo Nielsen 2003)
  10. Re: [ListFiles] from a remote host ( Donovan Brooke 2003)
  11. [ListFiles] from a remote host ( Palle Bo Nielsen 2003)
  12. Re: [listfiles] anomaly (Rob Marquardt 2003)
  13. Re: [listfiles] anomaly (Gary Krockover 2003)
  14. Re: [listfiles] anomaly (Daniel Schutzsmith 2003)
  15. [listfiles] anomaly (Joe D'Andrea 2003)
  16. Re: [ListFiles] Within [LineItems] (James DeCambra 2001)
  17. Re: [ListFiles] Within [LineItems] (Kenneth Grome 2001)
  18. [ListFiles] Within [LineItems] (JWD 2001)
  19. Re: [listfiles] with max? (Aaron Lynch 2000)
  20. [listfiles] with max? (Kim Ingram 2000)
  21. Re: [CreateDate], [ListFiles] context tag broken on Linux? (Isaac Vega 2000)
  22. Re: [CreateDate], [ListFiles] context tag broken on Linux? (John Butler 2000)
  23. [CreateDate], [ListFiles] context tag broken on Linux? (John Butler 2000)
  24. Re: [ListFiles] & [loop] (PCS Technical Support 1998)
  25. Re: [ListFiles] & [loop] (Michael Winston 1998)
  26. Re: [ListFiles] & [loop] (Pat McCormick 1998)
  27. Re: [ListFiles] & [loop] (Kenneth Grome 1998)
  28. [ListFiles] & [loop] (Pat McCormick 1998)
  29. Re: [listfiles] nested in a [loop] (Pat McCormick 1998)
  30. [listfiles] nested in a [loop] (Pat McCormick 1998)
  31. [LISTFILES] (Michael Winston 1998)
  32. Re: [ListFiles] context & alias (Grant Hulbert 1997)
  33. [ListFiles] context & alias (Jeffrey L. Jones 1997)
  34. Re: [listfiles] problems (Grant Hulbert 1997)
  35. [listfiles] problems (Thomas Wedderburn-Bisshop 1997)
  36. Re: Mac: [ListFiles] bug alert (Grant Hulbert 1997)
  37. Re: Mac: [ListFiles] bug alert (Kenneth Grome 1997)
  38. Mac: [ListFiles] bug alert (Grant Hulbert 1997)
  39. [Listfiles] vs Netfinder (grichter@panavise.com (Gary Richter) 1997)
2.1 PI MacI have several maintainance scripts which perform actions (like MOVEFILE) on batches of cart files. Currently, I have to use [listfiles] to get a count of the number of files in a folder, and then go through a decrementing loop to ensure that none of the files are skipped (MOVEFILE will ruin the index order of files). Each loop requires another LISTFILES and a SHOWIF the file index = the loop index.It all works, but it's causing an enormous load on the server, causing some actions like [replace] and [append] to work incorrectly (or time out?).I'm not exactly sure how [listfiles] works, but I'm pretty sure that it doesn't cache filenames. If it does, it doesn't index by them. It would be really helpful if it *did* index by file name. This would ensure that the correct files are being hit during any actions inside a LISTFILES loop. Maybe change [listfiles] to [LISTFILES index=filename] (defaults to system order if no index is specified). Is this feasible?I have a similar gripe with [lineitems] (it would be nice it reference a lineitem by SKU), but that hasn't caused too many problems for me.I suppose I could just write out my file list to a database and call it up from there, but I'm not too anxious to start writing out more files than I already am.MichaelMichael Winston *By Phone!: (503)/652/8815 x341 Internet Coordinator *By e-mail!: michaelw@dhorse.com Dark Horse Comics, Inc. *By web!: http://www.dhorse.com/ Michael Winston

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:

nested context (1998) WebCatalog/Mac 2.1b2 - PIXO (1997) Upload Plugin (1998) International Orders (1998) Extra Text Fields (was Another question) (1997) WebMerchant 1.6 and SHTML (1997) My Eyes doth deceive me (2002) [WebDNA] Hmmm ... (2008) Referrer (2000) [OT] FTP client (2003) WebCat b13 CGI -shownext- (1997) getting images' width/height (1998) why .HTML pages no processing? (2000) Email within tmpl ? (1997) [replaceChars] would be nice ... (1997) WebMerchant when CC network is down (1998) Applescript, WebDNA, and PDF (1997) counters from other site? (1998) OK, here goes... (1997) PIXO with cometsite ... and/or other plugins (1998)