Script to Alert a file and sends an email

Hello All,

I need a script which alerts me when a files arrive in a directory. I don't need every file. but i need some specific pattern file. And i need to get automatic email gettin as an alert

For Example:
/a/b/c/ : directory

format of file should take regualr expression or manually giving the specific file names

eg: B([0,3,4,5,8,2][2,4,1,3,6,8])_ABCDEFG_[0-9]{8}_[A-Z]{4}_[0-9]{12}.TXT.gz

It should alert me that the file has been arrived whenever the file was dumped into that specified directory.

Please help me guys. I need it urgently .plzzzzz

You should then have a deamon continuously scanning the folder you want to monitor
or
you should have a scheduled job that scan the folder at a certain frequency (depending on your needs) to check whether or not a file has arrived in it.

What have you tried so far ? which frequency ?

put in cronjob.

s=$(find /a/b/c -type f |egrep "B[034582][241368]_ABCDEFG_[0-9]{8}_[A-Z]{4}_[0-9]{12}.TXT.gz" )

if [[ $s != "" ]] ; then
  echo $s |mailx -s "file arrived" krux_rap@unix.com
fi