I have a program im writing that needs to look for a file in a certain directory then when it find the file add the contents to a database.
I have the program working which does this however the filename changes depending on when it was created. The filename structure is as follows:
Where datetime changes depending on when it was created. So i basically need some code to look for the first file in a directory that start with info_ and it into a variable and then for that file execute a set of commands (i have this code already) then delete the file from the directory and move onto the next file. However new files will be dropped into the directory all the time so it needs to be in a loop. Any help wld be much apreciated