MS robocopy backup and syntax usage

Starting in Windows Vista, Microsoft introduced robocopy command to replace xcopy from Windows XP. Robocopy can be downloaded and installed on any Windows XP or even older Windows Server computer. I use this simple robocopy script that runs as a scheduled task every day to backup “My Documents” folder to the file server:

@echo off
net use K: /delete
net use K: \\192.168.1.116\backup
@echo on
robocopy "C:\Users\user-name-here" "K:" /E /A /V /NDL /NP /LOG:"C:\backupLog.txt" /XF *.mp3 ntuser.* /XD appdata favorites links searches "Saved Games" "Application Data" Cookies "Local Settings" /ZB /R:3 /W:10

Leave a Reply

Your email address will not be published. Required fields are marked *