Using an IFC toolkit, you can automate it easily
import ifcopenshell
f = ifcopenshell.open("file.ifc")
print(f.wrapped_data.header.file_schema.toString())
Which will print something like
FILE_SCHEMA(('IFC2X3'))
And if you open the file in any text editor, it’s found close to the top of the file, in the header section:
ISO-10303-21;
HEADER;FILE_DESCRIPTION(('ViewDefinition [CoordinationView_V2.0, QuantityTakeOffAddOnView]','Option [Drawing Scale: 100.000000]','Option [Global Unique Identifiers (GUID): Keep existing]','Option [Elements to export: Visible elements (on all stories)]','Option [Partial Structure Display: Entire Model]','Option [IFC Domain: Custom]','Option [Structural Function: All Elements]','Option [Convert Grid elements: Off]','Option [Convert IFC Annotations and ARCHICAD 2D elements: Off]','Option [Convert 2D symbols of Doors and Windows: Off]','Option [Explode Composite and Complex Profile elements into parts: Off]','Option [Export geometries that Participates in Collision Detection only: Off]','Option [Multi-skin complex geometries: Complex profile]','Option [Elements in Solid Element Operations: BRep]','Option [Elements with junctions: BRep]','Option [Slabs with slanted edge(s): BRep]','Option [Use legacy geometric methods as in Coordination View 1.0: Off]','Option [IFC Site Geometry: As boundary representation (BRep)]','Option [IFC Site Location: At Project Origin]','Option [Curtain Wall export mode: Single Element]','Option [Railing export mode: Single Element]','Option [Stair export mode: Single Element]','Option [Properties To Export: All properties]','Option [Space containment: Off]','Option [Bounding Box: Off]','Option [Geometry to type objects: Off]','Option [Element Properties: Off]','Option [Property Type Element Parameter: Off]','Option [Quantity Type Element Parameter: Off]','Option [IFC Base Quantities: On]','Option [Window Door Lining and Panel Parameters: Off]','Option [IFC Space boundaries: Off]','Option [ARCHICAD Zone Categories as IFC Space classification data: On]','Option [Element Classifications: On]'),'2;1');
FILE_NAME('/Users/stefan/Models/file.ifc','2018-01-04T17:04:39',('Architect'),('Naam bureau'),'The EXPRESS Data Manager Version 5.02.0100.09 : 18 Aug 2016','IFC file generated by GRAPHISOFT ARCHICAD-64 21.0.0 INT FULL Macintosh version (IFC add-on version: 5010 INT FULL).','The authorising person');
FILE_SCHEMA(('IFC2X3'));
ENDSEC;