Delete layer and reassign the objects it contains to another layer?

Thank you all for your replies. I’ve just tried Karim’s script and it worked really well. So far I haven’t found any limitations with blocks.