The [Files] Pick Subset module picks a subset of files from the supplied FileSource, up to the specified number of files, and returns their names in an output list parameter.
Full details of this module are available in the knowledgebase article: Using the [Files] Pick Random module to select a non-linear set of file from a group