Fantastic Dan, thank you so much this is great! Just have one further question…
It works like a charm as long as there are no locked layers in the compositions, if there are locked layers it gives an error after the first composition and doesn’t affect the following compositions selected in the project panel. Is there any way around this, for the script to ignore errors and keep running?