bigbalbossa
Programmer
I would like to delete files from a remote server via ftp based on date. A 'dir' produces this listing:
-rwxrwx--- 1 proc C01998 42 Nov 23 12:12 HF_AVSVH_OP.ctl
-rwxrwx--- 1 proc C01998 40 Dec 12 10:37 HF_AVS_OP.ctl
Retention is 10 days, so the file HF_AVSVH_OP.ctl should be deleted (base on todays date of Dec 13). I was thinking about redirecting the 'dir' command to a file and parsing out the filename and date componets. But i'm not sure how to compare the dates.
Any other thoughts?
-rwxrwx--- 1 proc C01998 42 Nov 23 12:12 HF_AVSVH_OP.ctl
-rwxrwx--- 1 proc C01998 40 Dec 12 10:37 HF_AVS_OP.ctl
Retention is 10 days, so the file HF_AVSVH_OP.ctl should be deleted (base on todays date of Dec 13). I was thinking about redirecting the 'dir' command to a file and parsing out the filename and date componets. But i'm not sure how to compare the dates.
Any other thoughts?