We propose a batch-scheduling model to minimize the total actual flow time (TAF) of parts to be processed in a flow shop consisting of m batch-processing machines. A batch-processing machine (BPM) is a machine that can process several parts at once, and the TAF of parts is the total interval time from the arrival times to the corresponding due date. In the real world, shop floors often have production lines with BPMs and multistage processes. We were motivated by a real problem in the aircraft industry and aimed to simultaneously satisfy the due dates and minimize the total time that parts spend in the shop. The problem was formulated as a mathematical model and solved using a proposed algorithm. The batch-scheduling problem is divided into batching and scheduling subproblems. The solution has been obtained by adopting backward scheduling. This paper develops a new model of flow shop scheduling problem for the shop with batch processing machines and the heuristic solution method. It provides numerical examples and their results to demonstrate the effectiveness of the proposed algorithm for solving the problem.