So you need to check, whether the backup file created within the 24 hours first, if so, then delete all the backup files which are older than 24 hours
To find the files created withing 24 hours try this,
if (1 > -M $filename) { # Your code goes here }If any files found then do your normal delete (deletes backups that are older than 24 hours) or skip the deletion part.
In reply to Re: Delete all but the most recent backup file
by vinoth.ree
in thread Delete all but the most recent backup file
by jagexCoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |