Starting in a directory on my server, I need to delete all directories
below it which only contain files older than a certain age.
To be clear, I don't just want to delete old files; if a directory has
any new files in it then I don't want to delete the older files that
might also be in there.
Background: I run dspam on a server, and it creates a directory for each
mail address it scans, containing a log and a quarantine mailbox,
amongst other things. I have many many directories that were created
automatically for non-existent users and haven't seen any changes in
months or even years, but "active" directories do have old files in them
(preferences files, etc). So I want to find directories that haven't had
any of their contents change in (say) 6 months, and then delete the
whole directory.
--
Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
Registered in England (0456 0902) @ 13 Clarke Rd, Milton Keynes, MK1 1LG