Re: EDB delete multiple records question
- Posted by ags <eu at 531pi.co.nz> Jul 05, 2005
- 517 views
Ken Orr wrote: > > Wouldn't iterating through the records backward work? Or am I missing > something? > > }}} <eucode> > -- check missing files > msg("Checking missing...") > for i = db_table_size() to 1 by -1 do > rec = db_record_data(i) > de = dir(rec[TRK_KEY]) > if atom(de) then > msg(sprintf("Deleting record %s", {rec[TRK_NAME]})) > db_delete_record(i) > end if > end for > files=db_table_size() > tt = time() - t0 > msg(sprintf("Done. %d files, %4.2f seconds", {files, tt})) > > </code> > LOL. Yes, seems to work fine! Thanks for the out-of-box thinkingMuch quicker, all under 0.3s. Gary