I am trying to copy files from source to destination that are only a maximum of 1 day old. I currently use the robocopy command with /purge and /maxage:1 which succeeds in copying only the files that were modified in the last day.
The problem is the purge command only deletes the older files in the destination that no longer exist in the source. In this case the files still exist in the source so the destination grows and grows.
Is there a way to copy only files that are 1 day old and delete those in the destination that are older than 1 day?