Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

TensorFlow 2.0 version

Defined in generated file: python/ops/

Returns the set of files matching one or more glob patterns.


  • tf.compat.v1.matching_files
  • tf.matching_files

Note that this routine only supports wildcard characters in the basename portion of the pattern, not in the directory portion. Note also that the order of filenames returned can be non-deterministic.


  • pattern: A Tensor of type string. Shell wildcard pattern(s). Scalar or vector of type string.
  • name: A name for the operation (optional).


A Tensor of type string.