Hello, i have a requirement where i need to create a script which would check for a file name called XX_YYYY_ZZ in the directory inbound and as soon as the file is delivered in this directory a email needs to be sent to a user abc@yahoo.com
The plan is to put script in the core process to run it every minute to check for new files.
Thanks in advance,
Regards
RaJ
---------- Post updated at 07:16 PM ---------- Previous update was at 06:21 PM ----------
I will make it a point i reply to the concerned forum from next time around. I would appreciate if one of you could help me with the script to find the time when the file was delivered rather than the availability of the time in the directory.
Thanks Anchal.. i think i wasnt clear earlier. An approximate time would be enough to capture. The problem is i would like to capture the details of the file which is delivered today, because the directory could contain files with older date which isnt necessary.
So logic should be something like
1) search for filename with pattern "XXX_YYY_ZZZ" since this kind of files are delivered on a daily basis. The filename will contain some characters after this pattern.
2) Check if the file is delivered today(current day)
3) If 1 & 2 are yes then the current time should be captured along with the file name.
4) Mail to someone@domain.com