I have csv files located in a folder with names that include a time reference (11_30_12_21_2011) might mean for example 11:30 Dec 21, 2012 GMT. They also have a reference to a keyword like “basketball” in the file name. These files are written periodically to this folder. I need code that can run on a shared host that look for today’s date and figure out how many records (rows) are in the files and write that number and the date to a database record with the matching keyword.
One complication is that for weekends and holidays it needs to take the average of that day and the next day to post into the next day's record in the database. I cannot give access to the shared host so you will have to give me instructions so set it up.
The code needs to be timed so that it runs shortly after the above mentioned files are created reads the correct file and posts the data to the database. The shared hosting is on a Linux machine.