Here' s a batch file that will back up all your source files and zip it with 7zip with the datetime stamp on each successful compilation. Only external prerequisite is 7zip which is free.
It will serve as a simple automatic version control and backup to cloud if your source files are on Dropbox/ Gdrive / Skydrive.
The Backup folder can have hard coded path or can use relative paths as shown above. It will be created automatically even if it does not exist.
If you want to create a Project folder as a sub folder to the backup folder just append the project folder name as in
..\BackupFolder\ProjectName\
If Project name is to be appended to zip file name just modify it to ..\BackupFolder\ProjectName\ProjectName
Please note that there is no trailing back slash in the above case.
Now you can have Time and date stamped backups for each of your projects without using export as zip file and automatically.
I have updated the batch file with more comments for customization.
It will serve as a simple automatic version control and backup to cloud if your source files are on Dropbox/ Gdrive / Skydrive.
- Copy attached batch file to your computer.
- Add the following line to your project
#CustomBuildAction: 4,Drive:\PathToYourBatchFile\Auto7Zip4B4A.cmd, ..\ ..\BackupFolder\
- Compile your project
The Backup folder can have hard coded path or can use relative paths as shown above. It will be created automatically even if it does not exist.
If you want to create a Project folder as a sub folder to the backup folder just append the project folder name as in
..\BackupFolder\ProjectName\
If Project name is to be appended to zip file name just modify it to ..\BackupFolder\ProjectName\ProjectName
Please note that there is no trailing back slash in the above case.
Now you can have Time and date stamped backups for each of your projects without using export as zip file and automatically.
I have updated the batch file with more comments for customization.
Attachments
Last edited: