I have 'n' number of files on a server. The files are ftp'd to the server every 15 minutes. The file names look like abc_200408101850.csv(It has year/month/date/hour/min/sec). I want to delete the files that doesn't have today's date. Again, I have to delete using a ssh beacuse they reside on the server. I am unable to think of a clean logic. Does the following sound good?
1. Read the dir.
2. Check for the today's date in the file name.
3. If yes, don't delete the dile.
4. If no, then delete the file.
Thanks
1. Read the dir.
2. Check for the today's date in the file name.
3. If yes, don't delete the dile.
4. If no, then delete the file.
Thanks