Re: EDB delete multiple records question

new topic     » goto parent     » topic index » view thread      » older message » newer message

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 thinking smile
Much quicker, all under 0.3s.

Gary

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu