However, you could store your file
names as row names in the matrix.
Not quite; row- and col-names cannot contain period (full stop) as
those are reserved for equation.coefficient syntax.
Why not just create some new Stata variables which contain the items
to be tracked as observations 1,...? Then you can have both string
variables and numeric variables with no restrictions.