All Tutorials / JustinRatliff / Auto Backup of EZB Project

Auto Backup of EZB Project

Step 3 Using the Batch file with EZ-Builder

In EZ-Builder, add a new script and name it "AutoBackup", then enter the following code:

(NOTE, this IS EZ-SCRIPT code, this is entered in EZ-Builder!!!)

Code:


#This will launch a batch file to auto backup the EZB project file
#You must have the batch file configured for this to work
Exec("C:\Users\YourName\Documents\EZ-Builder\My Projects\BatchFiles\YourBatchFileName.bat")



This is example code, you will need to change the path and file name to match the location and file name of your batch file.

Once the code is entered, save the script. Then run it, if all goes well the batch file should run and create a copy of your project file in the location you declared in the batch file with a date and time stamp. If you encountered any errors, check your script and make sure the path and file name of the .bat is correct.

Where you take it from there is up to your imagination. You could use this example and build on it to make your robot back up it's project file automatically every time it is ran or once a week or on voice command.