in reply to moving old files

I'd use shell scripting for this, something like this:
log_dir = "/etc/httpd/logs/2006" arch_dir = "/etc/httpd/logs/archive" find $log_dir -mtime +0 -type f -exec gzip {} \; -exec mv {}".gz" $arc +h_dir \;