Auto Backup of EZB Project

Step 2 The Batch file Code

Open your batch file if you need by right clicking on it and select edit. This will open the batch file in Notepad application. Next, enter the following code in the batch file:

(NOTE This is NOT EZ-Script CODE!!!!!!!!)


REM actual code:
xcopy /s "C:\Users\YourName\Documents\EZ-Builder\My Projects\YourProject.EZB" "C:\Users\YourName\Desktop\YourBackUpLocation\BackUp"
ren "C:\Users\YourName\Desktop\YourBackUpLocation\BackUp\YourProject.EZB" "YourProject.EZB - %date:/=-% %time::=-% .ezb"

This is a general batch file code, you'll need to modify the path and files names to match your project and folder path needs.

Breaking the code down:

REM - mean that is a remark and is not runnable code, much like # is used to make comments in ARC scripts.

xcopy /s - is the command to copy the path/filename -to- path for the copied file

ren - is the command to rename. This renames the file we copied and adds a date and time stamp. If we did not rename our file we copied, each new copy would copy over the old file, which is not always desirable.

Once your code is entered, save the file and close it. At this point you can actually double click on the .bat batch file and it should run and create a renamed copy of your file in the folder path you specified. Try it and make sure it works. If not, recheck the code in the .bat batch file.


ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.