robocopy copies folders reliably and only what changed. /MIR mirrors the source exactly, including deletions, so point it at a dedicated backup folder. A scheduled task runs it every night.
# backup.ps1 robocopy "$env:USERPROFILE\Documents" "D:\Backup\Documents" /MIR /R:2 /W:5 /LOG:"D:\Backup\log.txt" # schedule it (run once, as administrator) $action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-File C:\scripts\backup.ps1" $trigger = New-ScheduledTaskTrigger -Daily -At 3am Register-ScheduledTask -TaskName "Nightly backup" -Action $action -Trigger $trigger