Re: Any help gratefully appreciated
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 39791
interpreted = N
texte = It is not safe to delete files within a listfiles.When you use listfiles it counts all the files, so if you have 10 files,then delete one, listfiles still thinks you have 10, which is why they donot delete as you think they should.You need to use a temporary database or otherwise store the results of yourlistfiles, then take action based on the temp database.The files don't match as you have files named with .new and .old. You wouldneed to strip that out before doing your comparison.Daleon 10/31/2001 4:35 PM, Laeg Ent. at laeg_enterprises@yahoo.co.uk wrote:> I have a folder called Orders> I have a file in this folder calld filelist.db> > I list the filenames in Orders and list the filenames> in filelist.db, if they do not match, I delete the> filename in filelist.db. Its that simple. However this> keeps happening> > Filenames in Orders= 1.old> 2.old> 3.old> 4.old> 5.old> 6.old> 7.old> 8.old> 9.old> 10.old> > Filenames in Orders/filelist.db=> 1.new> 2.new> 3.new> 4.new> 5.new> 6.new> 7.new> 8.new> 9.new> 10.new> > Therefore no filenames are equal delete them all so.> When I run the code it only deletes every second one> so 1,3,5,7,9 will be deleted and not the others> > that leaves 2,4,6,8,10> > if I run it again, it will again take the second ones> > and delete 2,6,10 leaving 4,8> > Why does it do this, this is the code:> > > [text]doDelete=[F][/text]> [search> db=orders/filelist.db&neFILENAMESdatarq=find_all&rank=on]> [founditems]> [listfiles orders]> [If [filenames]=[filename]]> [then]> [text]doDelete=[T][/text]> [/then]> [else]> [/else]> [/If]> [/listfiles]> [showif [doDelete]![T]]> [delete> db=orders/filelist.db&eqFILENAMESdatarq=[filenames]]> [FlushDatabases]> [/showif]> [text]doDelete=[F][/text]> [/founditems]> [/search]> Filelist database updated-------------------------------------------------------------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:
It is not safe to delete files within a listfiles.When you use listfiles it counts all the files, so if you have 10 files,then delete one, listfiles still thinks you have 10, which is why they donot delete as you think they should.You need to use a temporary database or otherwise store the results of yourlistfiles, then take action based on the temp database.The files don't match as you have files named with .new and .old. You wouldneed to strip that out before doing your comparison.Daleon 10/31/2001 4:35 PM, Laeg Ent. at laeg_enterprises@yahoo.co.uk wrote:> I have a folder called Orders> I have a file in this folder calld filelist.db> > I list the filenames in Orders and list the filenames> in filelist.db, if they do not match, I delete the> filename in filelist.db. Its that simple. However this> keeps happening> > Filenames in Orders= 1.old> 2.old> 3.old> 4.old> 5.old> 6.old> 7.old> 8.old> 9.old> 10.old> > Filenames in Orders/filelist.db=> 1.new> 2.new> 3.new> 4.new> 5.new> 6.new> 7.new> 8.new> 9.new> 10.new> > Therefore no filenames are equal delete them all so.> When I run the code it only deletes every second one> so 1,3,5,7,9 will be deleted and not the others> > that leaves 2,4,6,8,10> > if I run it again, it will again take the second ones> > and delete 2,6,10 leaving 4,8> > Why does it do this, this is the code:> > > [text]doDelete=[F][/text]> [search> db=orders/filelist.db&neFILENAMESdatarq=find_all&rank=on]> [founditems]> [listfiles orders]> [If [filenames]=[filename]]> [then]> [text]doDelete=[T][/text]> [/then]> [else]> [/else]> [/If]> [/listfiles]> [showif [doDelete]![T]]> [delete> db=orders/filelist.db&eqFILENAMESdatarq=[filenames]]> [flushdatabases]> [/showif]> [text]doDelete=[F][/text]> [/founditems]> [/search]> Filelist database updated-------------------------------------------------------------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/
dale
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:
Where is the linux 4.02b5 FTP download located? (2000)
Security Levels... Possible? (2000)
IE-caching (1998)
headers in webcat 4.0. (2000)
[WebDNA] suggestion: listwords return xth word (2017)
I'm new be kind (1997)
Show shoppingcart after remove last item (1997)
Multiple 'Users.db' files not possible (1997)
# fields limited? (1997)
WebCat2 beta 11 - new prefs ... (1997)
Still can't get this taxrate to work... (1999)
convertWords... (2001)
WebCat2 several catalogs? (1997)
WC2b15 File Corruption (1997)
Sorting by date (1997)
New Weird Behavior (bug report) (2000)
shipping costs (1997)
[OT] Netscape Browser Window (2001)
This list needs a digest: rant, rave... (1997)
Re:WebCat Contest (1998)