Transfer files based on the YYYYMMDD in their filename and create target folder with YYYYMMDD
I'm finding a way to get the content of a file based on its filename and it should drop files to target based on date. .
All of the target files are in the same directory, but I'd like to select only the files which has "{Today's YYYYMMDD} as their postfix.
For example, if today is 20200326,
/tmp/pfd_exch_namr_bbid.px.hpc.gz.20200326 -> create folder with 20200326 and drop file.
/tmp/pfd_exch_namr_bbid.px.hpc.gz.20200326-> Drop file into above folder
/tmp/pfd_exch_namr_bbid.px.hpc.gz.20200325-> not ok because this YYYYMMDD is not today.
Approach i followed :
ListFile: Extract only the files whose name ends with "gz.20200326"
UpdateAttribute: Substitute YYYYMMDD into an Attribute "today"

RouteOnAttribute: Extract only the file which matches
${filename:matches(${today:prepend('[^\.].*gz.'):append('\d{8}')})} (where $filename is the target file name) and pass it as Relationship "target_file"
But when executing, looks like it's not matching my requirement and all files are matching.
Could you please assist me on this.

