Determine AVM1 vs AVM2 for bulk SWF files

Let’s say we have a directory with 10,000 SWF files.

There is a great need to determine what SWF files are AVM1 (AS2 or earlier), and what SWF files are AVM2 (AS3).

Can anyone point me in the right direction to determine the AVM version for a large amount of files?

It seems like I could write a script that loops through every file, checks some magic hex value in the file’s binary data, and records the result somewhere.

Does this sound feasible? Is there already something like this? Does anyone know what data in the SWF itself holds the AVM version?