Very interesting post about doing the job without X-command. I have a preference on not using SAS code if it's an IT job. If you're administrating and managing your server this is great but if you have a team of sysadmins monitoring your server be kind with them and write dos or powershell commands so they see what's happening and can intervene.
robocopy is a good tool to move and delete your files.

compressing on a windows server with powershell (source is google):
$AllLogs = Get-Childitem -Path D:\Logs\Notification\Temp -Recurse -Filter *.log
$LastWeek = (Get-Date).AddDays(-7)
$OldLogs = $AllLogs | Where-Object { $_.LastWriteTime -lt $LastWeek }
Foreach ($Log in $OldLogs) {
$Destination = ($Log.Directory.ToString() + "\" + $Log.BaseName)
Compress-Archive -Path $Log.FullPath -Destination $Destination
}