tf.matching_files(pattern, name=None)

tf.matching_files(pattern, name=None)

See the guide: Inputs and Readers > Dealing with the filesystem

Returns the set of files matching a pattern.

Note that this routine only supports wildcard characters in the basename portion of the pattern, not in the directory portion.


  • pattern: A Tensor of type string. A (scalar) shell wildcard pattern.
  • name: A name for the operation (optional).


A Tensor of type string. A vector of matching filenames.

Defined in tensorflow/python/ops/