Same way…just make it a recurring event that triggers until the number of files is 0.