The listbox stores only plain text, so you have to store the relevant information about your records in another list or in a dataset. As long as your listbox is not sorted (that means, listbox and objects list are in same order) you can do something like that:
for(int i=0; i<listbox.Count; i++)
{
id = yourDataset.Rows[i][indexOfId];
execSql("delete from yourTable where yourId="+id);
}
P.S.: As your list is a list of unique filenames, you can try this:
string files = string.Empty;
string separator = "";
for each(item in listbox.items)
{
files += separator + "'" + item + '"';
separator = ", ";
}
sql = "delete from yourTable where filename in ("+files+")";
execSql(sql);