In this paper we present a new scheduling rule for minimizing the number of tardy jobs in a dynamic flow shop consisting of m machines. Jobs with processing times and due dates randomly arrive to the system. We assume that job arrival or release dates are not known in advance. The new rule is derived by dividing the m machine problem into several one-machine sub-problems, and optimally solving each one-machine sub-problem by applying a variation of the Moore-Hodgson algorithm. Computational results indicate that the proposed rule performs 15-20% better than SPT, which is currently one of the most effective methods for minimizing the number of tardy jobs in dynamic flow shops. Results are given for 10, 20, and 50 jobs and 2, 5, and 10 machines under various shop conditions.