Re: old problem

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39910
interpreted = N
texte = Thanks very much for replies Rob,If I were to type in http://myserver/thisprog.tpl this should do its business only it still leaves all the filenames in the db when they should be deleted.Perhaps my dependencies are wrong. This should work assuming that a)orders/filelist.db has a .hdr with the word filenames in itb)does case matter with the word filenames in lines like(i)[search db=orders/filelist.db&neFilenamesData=[blank]] (ii)[delete db=orders/filelist.db&eqFILENAMESdata=[text]delFileThanks again. --- Rob Marquardt wrote: > on 11/5/01 6:43 am, Laeg Ent. at > laeg_enterprises@yahoo.co.uk so noted... > > > I still have the same problem. I am trying to > compare > > the list of filenames in a folder A with a list of > > filenames in a db file B. If an an order name > appears > > in B that is not in A then we delete that filename > out > > of the db file. Seems like a well confined problem > but > > I'm having trouble with it. I think its my > placement > > of [Flushdatabases], but I'm not sure. > > Sorry, the solution I posted a week ago did the > opposite of what you were > looking for (it removed matching items from the db, > leaving the unmatched). > This one does the compare and removal properly. > > > [math show=f]delTotal=0[/math] > > [search > db=orders/filelist.db&neFilenamesData=[blank]] > [founditems] > [text]delFile=T[/text] > [listfiles path=orders] > [showif [filename]=[filenames]] > [text]delFile=F[/text] > [/showif] > [/listfiles] > [showif [delFile]=T] > [math show=F]delTotal=[delTotal]+1[/math] > [text]delFile[delTotal]=[filenames][/text] > [/showif] > [/founditems] > [/search] > > [loop start=1&end=[delTotal]] > [delete > db=orders/filelist.db&eqFILENAMESdata=[text]delFile[index][/text]] > [/loop] > > > > > The other comments from the 31st are still valid: > > > [search > > > db=orders/filelist.db&neFILENAMESdatarq=find_all&rank=on] > > Parameters within WebCat commands shouldn't be > quoted. Also, there's no > rank=on. Use rank=off to return results in the same > order they appear in the > database. > > > [text]doDelete=[F][/text] > > If you're setting text variables to use as booleans, > I'd recommend using T > and F instead of [T] and [F]. > > > [If [filenames]=[filename]] > > [then] > > [text]doDelete=[T][/text] > > [/then] > > [else] > > [/else] > > [/If] > > If you're not needing it, the [else] is optional. > And for simple does this > equal this comparisons, [showif] is your friend! : > ) > > > [delete > > > db=orders/filelist.db&eqFILENAMESdatarq=[filenames]] > > [FlushDatabases] > > [/founditems] > > [FlushDatabases] is going to commit and close *all* > databases open on your > server. If you don't have Commit Databases set to > automatic in your WebCat > preferences, you might want to just put a > [commitdatabase > db=orders/filelist.db] in there instead (outside the > [founditems]) to commit > just that one database yet still leave it open in > RAM. Do a [closedatabase > db=orders/filelist.db] if you want the database > removed from RAM as well. > > > Rob Marquardt > Designer/Resident Wirehead > Toast Design > > 800 Washington Avenue North > Minneapolis MN 55401 > 612.330.9863 v > 612.321.9424 f > http://www.toastdesign.com > > > ------------------------------------------------------------- > 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/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com------------------------------------------------------------- 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: [WebDNA] Old Problem, the exclamation point (Terry Wilson 2014)
  2. Re: [WebDNA] Old Problem, the exclamation point (Terry Wilson 2014)
  3. Re: [WebDNA] Old Problem, the exclamation point (Donovan Brooke 2014)
  4. Re: [WebDNA] Old Problem, the exclamation point (Terry Wilson 2014)
  5. Re: [WebDNA] Old Problem, the exclamation point (Steve Braun 2014)
  6. Re: [WebDNA] Old Problem, the exclamation point (Terry Wilson 2014)
  7. Re: [WebDNA] Old Problem, the exclamation point (Donovan Brooke 2014)
  8. Re: [WebDNA] Old Problem, the exclamation point (Steve Braun 2014)
  9. Re: [WebDNA] Old Problem, the exclamation point (Tom Duke 2014)
  10. [WebDNA] Old Problem, the exclamation point (Steve Braun 2014)
  11. Re: old problem (Brian Fries 2001)
  12. Re: old problem (Rob Marquardt 2001)
  13. Re: old problem (Laeg Ent. 2001)
  14. Re: old problem (Laeg Ent. 2001)
  15. Re: old problem (Rob Marquardt 2001)
  16. Re: old problem (Laeg Ent. 2001)
  17. Re: old problem (Rob Marquardt 2001)
  18. old problem (Laeg Ent. 2001)
  19. Re: OLD PROBLEM (bob 1997)
  20. OLD PROBLEM (natasha 1997)
Thanks very much for replies Rob,If I were to type in http://myserver/thisprog.tpl this should do its business only it still leaves all the filenames in the db when they should be deleted.Perhaps my dependencies are wrong. This should work assuming that a)orders/filelist.db has a .hdr with the word filenames in itb)does case matter with the word filenames in lines like(i)[search db=orders/filelist.db&neFilenamesData=[blank]] (ii)[delete db=orders/filelist.db&eqFILENAMESdata=[text]delFileThanks again. --- Rob Marquardt wrote: > on 11/5/01 6:43 am, Laeg Ent. at > laeg_enterprises@yahoo.co.uk so noted... > > > I still have the same problem. I am trying to > compare > > the list of filenames in a folder A with a list of > > filenames in a db file B. If an an order name > appears > > in B that is not in A then we delete that filename > out > > of the db file. Seems like a well confined problem > but > > I'm having trouble with it. I think its my > placement > > of [flushdatabases], but I'm not sure. > > Sorry, the solution I posted a week ago did the > opposite of what you were > looking for (it removed matching items from the db, > leaving the unmatched). > This one does the compare and removal properly. > > > [math show=f]delTotal=0[/math] > > [search > db=orders/filelist.db&neFilenamesData=[blank]] > [founditems] > [text]delFile=T[/text] > [listfiles path=orders] > [showif [filename]=[filenames]] > [text]delFile=F[/text] > [/showif] > [/listfiles] > [showif [delFile]=T] > [math show=F]delTotal=[delTotal]+1[/math] > [text]delFile[delTotal]=[filenames][/text] > [/showif] > [/founditems] > [/search] > > [loop start=1&end=[delTotal]] > [delete > db=orders/filelist.db&eqFILENAMESdata=[text]delFile[index][/text]] > [/loop] > > > > > The other comments from the 31st are still valid: > > > [search > > > db=orders/filelist.db&neFILENAMESdatarq=find_all&rank=on] > > Parameters within WebCat commands shouldn't be > quoted. Also, there's no > rank=on. Use rank=off to return results in the same > order they appear in the > database. > > > [text]doDelete=[F][/text] > > If you're setting text variables to use as booleans, > I'd recommend using T > and F instead of [T] and [F]. > > > [If [filenames]=[filename]] > > [then] > > [text]doDelete=[T][/text] > > [/then] > > [else] > > [/else] > > [/If] > > If you're not needing it, the [else] is optional. > And for simple does this > equal this comparisons, [showif] is your friend! : > ) > > > [delete > > > db=orders/filelist.db&eqFILENAMESdatarq=[filenames]] > > [flushdatabases] > > [/founditems] > > [flushdatabases] is going to commit and close *all* > databases open on your > server. If you don't have Commit Databases set to > automatic in your WebCat > preferences, you might want to just put a > [commitdatabase > db=orders/filelist.db] in there instead (outside the > [founditems]) to commit > just that one database yet still leave it open in > RAM. Do a [closedatabase > db=orders/filelist.db] if you want the database > removed from RAM as well. > > > Rob Marquardt > Designer/Resident Wirehead > Toast Design > > 800 Washington Avenue North > Minneapolis MN 55401 > 612.330.9863 v > 612.321.9424 f > http://www.toastdesign.com > > > ------------------------------------------------------------- > 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/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com------------------------------------------------------------- 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/ Laeg Ent.

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:

webcat NT with [dos] command (1997) A question on sub-categories (1997) Help! WebCat2 bug (1997) HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997) [math show=f]nuCheck1=[check1]=1[/math] = proper syntax?? (2000) 3 card formulas! (1999) Separate SSL Server (1997) Crash Log Question (2006) Notepad problems (1998) orders being printed (1998) AmEx, shipping (2000) syntax question, not in online refernce (1997) new WebDNA 5 command reference (2003) using a link like http://www.domain.com/username (2000) return two fields w/ [lookup] (1998) WebCat2 - storing unformatted date data? (1997) 3.0 [TEXT] variables (1998) Suggestions for Topics to be covered in an Advanced WebDNACourse... (1998) Help name our technology! I found it (1997) Web Site (2000)