Read the file when files is added to a folder and insert the content to a database [closed]

  1. create a db table to keep track of files in the folder
  2. create a script that compares folder contents with that db table
  3. if files found which aren’t in the table, sanitize content and insert into db, and add filename to tracking table
  4. if a file in table is no longer in folder, remove that file’s content from db and remove from tracking table
  5. set script to run via cron so that it checks folder at the interval you specify

hope this helps point you in the right direction 🙂

Leave a Comment