The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-26-2009
dhawalkv dhawalkv is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 4
Monitor directory and email

Hello all,

Can anyone please guide / help me in the following task....

I have a directory where some external users will upload pdf files. The filename of these pdf will be of a particular format (<id>-<first name>_<last name>_<some number>.pdf)
I want to make a script such that it takes (splits) the id from the filename and query the mysql database for the email address of that id (this can be done from a php script also) and then email on that particular id. Also this script has to run periodically (many times in a day...this can be done from cron).

I need some guidance on how to go about this.....whether this can be done from a shell script or php script and some help with the commands if shell script. My knowledge on PHP also is not very good, so if there are any inputs for using php then just guide me along.

Thanks....