hi

many of you may know it and use such a script for saving your work. i´ve created a small (a very small) batch-script to do this. the reason that i post it, is to provide it to users that could need it and for me that i get this back if i lost it tongue

1.) Download the command-line-version of 7zip at http://www.7-zip.org/download.html and put the program (7za.exe) into C:\windows\
2.) Create a new file in your project-directory called "backup.bat" and put this in the file:

7za a -r -x!backup.bat "C:\...\yourBackupDir\projectname"_%date%_%time:~0,2%-%time:~3,2%-%time:~6,2%.zip .\*

3.) Change the orange string to the directory where your backups should be saved. this can be your hdd, a usb-stick or a network-storage. Change the blue string to the name of your project. this is the start of the filename
4.) execute whenever you need a backup. the script will create in the backup-directory a new zip file (with that chosen name and the current timestamp) and add recursively all files and folders of the directory where backup.bat is located, except itself. if the backup-directory does not exist, it will be created automatically.

additionally, you can customize it:

7za a -r -x!backup.bat -x!media\ -x!debug*.c -ppassword "C:\...\yourBackupDir\projectname"_%date%_%time:~0,2%-%time:~3,2%-%time:~6,2%.zip .\*

in this example i have excluded the media-directory (orange) and all .c-files which filenames start with "debug". furthermore, i´ve set a password-protection (green). the password is "password" (the first p is the switch). if you want more, you can read the chm-helpfile that comes with 7zip


sorry for the spam tongue
have a nice day