Quick and dirty backup script [windows]
If your usual backup software takes ages to make a decent backup of your computer and you need a quick (and dirty) way to backup you project directory you could use robocopy.
The syntax is easy enough:
robocopy SOURCE DESTINATION /parameters
For example, you need to backup your local development webserver:
robocopy “c:\xampp\htdocs” “e:\dev-server\” /E /COPYALL
This would copy everything newer or changed from your local htdocs directory to the ‘dev-server’ directory on drive e:
/E – includes subdirectories
/COPYALL – includes file information
For a detailed list type in robocopy /?
I made myself a backup.bat on c:\ and put all robocopy commands i need executed in it. So i can type ‘backup’ on the command line and every backup i need is made.
Backup your XNA game projects on a USB drive.
[YOUR USERNAME] = Windows account you use to develop (executing user must have reading rights on files, can be done as admin)
X: = Letter your USB drive gets assigned in explorer. You can change it there, but there’s usually no need for that.
robocopy “c:\Users\[YOUR USERNAME]\Documents\Visual Studio 2010\Projects” X:\MyProjects\VS2010 /E /COPYALL
robocopy “c:\Users\[YOUR USERNAME]\Documents\Visual Studio 2008\Projects” X:\MyProjects\VS2008 /E /COPYALL
Put these two lines in a filename.bat to backup XNA3.1 and XNA4.0 at the same time.