rex.utilities.utilities.filename_timestamp

filename_timestamp(file_name, time_format='%Y-%m-%d_%H:%M:%S')[source]

extract timestamp from file name

Parameters
  • file_name (str) – file name or file path

  • time_format (str, optional) – datetime timestamp format, by default ‘%Y-%m-%d_%H:%M:%S’

Returns

str – Portion of file_name that matches given format