Re: delete file

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 30478
interpreted = N
texte = When wrking with date or time math, I beleive you need to put {} around the [dates]... also, I have attatched some code we use to perform the essentially same function that works marvelously...Derek[WRITEFILE secure=T&file=^db/[RANDOM].db]FILE [LISTFILES /ssl/shoppingcarts/][SHOWIF [MATH]{[TIME]}-{[MODTIME]}[/MATH]>[MATH]{04:00:00}[/MATH]][FILENAME] [/SHOWIF][/LISTFILES][/WRITEFILE][SEARCH db=^db/[lastrandom].db&neFILEdatarq=[BLANK]] [FOUNDITEMS] [MOVEFILE from=/ssl/shoppingcarts/[FILE]&to=/ssl/oldcarts/[FILE]] [/FOUNDITEMS] [/SEARCH] > >I'm trying to delete cart files that are 30 hours or more old. This >>doesn't seem to >>be working. Can anyone tell me why? >> >>[math show=f]vTotHours=((({[Date]}*24)+({[Time]}/3600))-30)[/math] >>[ListFiles ../ShoppingCarts/][showif [filename]>1] >>[Orderfile file=../ShoppingCarts/[FileName]] >>[FileName]-[math show=f]vCartHrs=(({[date]}*24)+({[time}/3600))[/math] >>[showif [vTotHours]>[vCartHrs]] >>[Deletefile ../shoppingcarts/[FileName]] >>[/showif][/orderfile][/showif] >>[/ListFiles] >> >Apart from the fact that your code is way to complicated for what you >want to do, I would change, [Deletefile ../shoppingcarts/[FileName]] >to [Deletefile ../ShoppingCarts/[FileName]] >-- > > >Micheal O Shea Email:micheal@com4u.ch >com4u.ch http://www.com4u.ch >Breitistrasse 7B PGP key available upon request. > >CH-5506 Maegenwil Tel: +41 62 896 46 26 >Switzerland > >------------------------------------------------------------- >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 > ------------------------------------------------------------- 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 Associated Messages, from the most recent to the oldest:

    
  1. Re: delete file (Derek C. 2000)
  2. Re: delete file (Michael O Shea 2000)
  3. delete file (Brian Grinde 2000)
  4. Re: Delete file through browser (PCS Technical Support 1999)
  5. Re: Delete file through browser (Kenneth Grome 1999)
  6. Delete file through browser (Donovan Rittenbach 1999)
When wrking with date or time math, I beleive you need to put {} around the [dates]... also, I have attatched some code we use to perform the essentially same function that works marvelously...Derek[WRITEFILE secure=T&file=^db/[random].db]FILE [LISTFILES /ssl/shoppingcarts/][SHOWIF [math]{[time]}-{[MODTIME]}[/MATH]>[math]{04:00:00}[/MATH]][FILENAME] [/SHOWIF][/LISTFILES][/WRITEFILE][SEARCH db=^db/[lastrandom].db&neFILEdatarq=[BLANK]] [founditems] [MOVEFILE from=/ssl/shoppingcarts/[FILE]&to=/ssl/oldcarts/[FILE]] [/FOUNDITEMS] [/SEARCH] > >I'm trying to delete cart files that are 30 hours or more old. This >>doesn't seem to >>be working. Can anyone tell me why? >> >>[math show=f]vTotHours=((({[date]}*24)+({[time]}/3600))-30)[/math] >>[ListFiles ../ShoppingCarts/][showif [filename]>1] >>[Orderfile file=../ShoppingCarts/[FileName]] >>[FileName]-[math show=f]vCartHrs=(({[date]}*24)+({[time}/3600))[/math] >>[showif [vTotHours]>[vCartHrs]] >>[Deletefile ../shoppingcarts/[FileName]] >>[/showif][/orderfile][/showif] >>[/ListFiles] >> >Apart from the fact that your code is way to complicated for what you >want to do, I would change, [Deletefile ../shoppingcarts/[FileName]] >to [Deletefile ../ShoppingCarts/[FileName]] >-- > > >Micheal O Shea Email:micheal@com4u.ch >com4u.ch http://www.com4u.ch >Breitistrasse 7B PGP key available upon request. > >CH-5506 Maegenwil Tel: +41 62 896 46 26 >Switzerland > >------------------------------------------------------------- >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 > ------------------------------------------------------------- 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 Derek C.

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:

form data submission gets truncated (1997) process SSI (1998) Warning: Mac OS X 10.2.4 Update Overwrites Apache's (2003) Payflow Pro Jar (2002) Cart# (1997) Date Math bug (1998) Hello??? (1997) Header info in content (1998) Searching Groups for multiple matches (1998) PCS Frames (1997) Sort Order on a page search (1997) textarea question (1998) Search design (1997) User/pass with tcpconnect (2000) Date math (1997) Forbidden CGI Error (1997) Running on Empty (1999) Help! WebCat2 bug (1997) RequiredFields template (1997) UK credit card info follow-up (1997)