Re: EmailCompleted Clean Up

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 38503
interpreted = N
texte = >On 9/7/01 3:27 PM, Clint Davis wrote: > >> Has anyone written code (that they'd like to share) for deleting old >> files from the EmailCompleted folder? >> >> If not, any pointers? >> >> (MacOS 9/WebSTAR 4.4/WebCat 4.02) > >I'll write it up for ya tonight and add it to my training site. > >The short version is you use a deletefile inside a listfiles loop. > >2 notes: > >B) listfiles doesn't have a max= argument, which is problematic for >directoriies with several thousands of files > >Green) a deletefile inside a listfiles only deletes Every Other matching >file. What a weird fluke. > It only deletes every other file because the index is dynamic while in the listfiles loop. If you want to do it right then build a list of items to delete while inside the listfiles loop and then delete them with a listwords loop on the list that you built.for example:[text]myList=[listfiles somefolder][filename]|[/listfiles][/text][listwords words=myList&delimiters=|] [deletefile somefolder/[word]] [/listwords] -- Sam LewisSamLewis.com Tel: 626-852-0956 Fax: 916-404-5698------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: EmailCompleted Clean Up (Bob Minor 2001)
  2. Re: EmailCompleted Clean Up (Brian B. Burton 2001)
  3. Re: EmailCompleted Clean Up (Glenn Busbin 2001)
  4. Re: EmailCompleted Clean Up (Sam Lewis 2001)
  5. Re: EmailCompleted Clean Up (Brian B. Burton 2001)
  6. Re: EmailCompleted Clean Up (Bob Minor 2001)
  7. EmailCompleted Clean Up (Clint Davis 2001)
>On 9/7/01 3:27 PM, Clint Davis wrote: > >> Has anyone written code (that they'd like to share) for deleting old >> files from the EmailCompleted folder? >> >> If not, any pointers? >> >> (MacOS 9/WebSTAR 4.4/WebCat 4.02) > >I'll write it up for ya tonight and add it to my training site. > >The short version is you use a deletefile inside a listfiles loop. > >2 notes: > >B) listfiles doesn't have a max= argument, which is problematic for >directoriies with several thousands of files > >Green) a deletefile inside a listfiles only deletes Every Other matching >file. What a weird fluke. > It only deletes every other file because the index is dynamic while in the listfiles loop. If you want to do it right then build a list of items to delete while inside the listfiles loop and then delete them with a listwords loop on the list that you built.for example:[text]myList=[listfiles somefolder][filename]|[/listfiles][/text][listwords words=myList&delimiters=|] [deletefile somefolder/[word]] [/listwords] -- Sam LewisSamLewis.com Tel: 626-852-0956 Fax: 916-404-5698------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Sam Lewis

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:

hidden (phantom) file downloads (2000) File Format Validation (2005) .htm file tags not showing up (2000) {Grouping} Docs (1999) [WebDNA] Euca Forum Update (2012) [OT] OSX (unix) favorite text editor. (2002) Pithy questions on webcommerce & siteedit (1997) Not really WebCat (1997) using showpage and showcart commands (1996) WebCatalog/Mac 2.1b2 - PIXO (1997) Suggestions for Topics to be covered in an Advanced (1998) [WebDNA] An unknown error occured // Deadlock avoided (2011) Emails sent twice (2000) Sorting via date (2002) WebCat vs. ASP (1999) Limiting user access to .tmpl files (1997) Problems searching from a FORM (1997) Nested tags count question (1997) WebCatalog Work (2001) WebCat2: Items xx to xx shown, etc. (1997)