0

I have files of two file pattern

HUB.SG.20220902.01.P

and

HUB.SG.20220902.001.P

in the second file name the .001. will keep on incrementing like the next file will be HUB.SG.20220902.002.P . . . HUB.SG.20220902.100.P and so on

but the first file will always be of the file name pattern as : HUB.SG.20220902.01.P

I want my File watcher job to just pick file of the pattern: HUB.SG.20220902.001.P and not of the pattern: HUB.SG.20220902.01.P

If I add in my job the filename = "path/HUB.SG..**.P" - it picks up files of both the filename pattern.

How do I resolve this so my file watcher job just picks up file of the filename pattern : "HUB.SG.20220902.___.P"

2 Answers2

0

Use one * to match on one or more characters (including nothing).

Use ? to match single character. In your example you would use HUB.SG.20220902.???.P

However, you can use Control-M system variables for the date (should you be looking for today's dated file as standard). In that case, use %%$ODATE in place of 2022090 etc.

Mark
  • 316
  • 1
  • 5
0

You can use a pattern like:

path/HUB.SG..**.???.P
user_0
  • 3,173
  • 20
  • 33