Function to delete structure in batch mode.