In compiling a series of exams (between ~10 and ~20 different tests, each with four questions), I would hope to have a single document, and a single preamble, using the exam class, but each individual exam printed to a different output file, for ease of distribution.
I noted the question Variations of an exam where similar (but not identical) exam questions are addressed to different "groups" of people facing a particular version of the exam, where only a part of the question changes between the different groups, as well as Making exams with multiple-choice questions in scrambled versions but they don't focus on separation to different output files.
As a separate resource, I could call on a script to act on the .pdf of the entire set of exams, and using qpdf separate the file in N files, one per group. But this needs manual specification of which pages belong to which group.
Not ideal.
Perhaps this can be handled by an entirely separate package?