Script: Selected all the Flagged item


I want to be able to batch select all the flag tasks under a tag view and then top them.

Which script can accomplish this?

I selected the item and then use the cut and paste method to top them, but this method will lost the original project information.