in reply to Delete directories older than 60 days
It looks like you changed your mind about on how to do this, but did not make all the changes needed after this change in mind, so that this part of the script hardly make any sense now. Either you create a variable for the difference, or you check the difference directly. Here, your if clause has no conclusion, and $days_diff has not been declared, nor initialized. Similarly, $months_ago has not been declared nor initialized, and the name is suspicious of a possible bug or misunderstanding. I would assume, from your narrative, that you want to compare the directory date against the current date, but that's quite far from what you do.if (date($dir_found) - date($months_ago); if($days_diff >= 60){
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Delete directories older than 60 days
by Anonymous Monk on Nov 14, 2014 at 19:49 UTC |