I have a database table that stores a destroy date for uploaded files.
The files are stored in one directory.
I'm a little lost on how to delete the file / files from the directory when the destroy date is due. I will mark them in the database as destroyed.
All of the files live in the same directroy and they are all pdf files.
The scan_doc table lists the folder they file is stored in and the name of the file is the primary key from the table, so a file I might want to delete looks like this:
H:\scanned_files\10\175.pdf
It seems like i should be releatively easy, but for a simple person like me, I'm stumped.
I was thinking of a query to select files that are listed as detroyed, that part I can figure out, then I need the logic to delete the file(s).
Any help would be appreciated.
Thanks