Re: EDB delete multiple records question

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

Wouldn't iterating through the records backward work? Or am I missing something?

-- 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> }}}

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

Search



Quick Links

User menu

Not signed in.

Misc Menu