xcopy "C:\Users\" "D:\backups\" /r /e /h /k /c /y
Example 2:
REM backup_Users_cjuckins.bat
REM 25 Feb 2010
rmdir /s /q "D:\backup_Users_cjuckins\"
mkdir "D:\backup_Users_cjuckins\"
xcopy "C:\Users\cjuckins\*.*" "D:\backup_Users_cjuckins\" /r /e /h /k /c /y > "D:\backup_Users_cjuckins.log"
More information on the web:
[[http://technet.microsoft.com/en-us/library/bb491035.aspx]]