Example Scripts

<< Click to Display Table of Contents >>

Navigation:  Using SyncBackPro > Technical Reference > Scripting >

Example Scripts

Previous pageReturn to chapter overviewNext page

 

SyncBackPro comes with a number of example scripts. There are also some example scripts online:

 

http://www.2brightsparks.com/syncback/scripts/index.html

 

If you've created a script that you think other people could use please visit the above page to submit it.

 

AllDrives: This is a location script which gives access to all the drives on a computer. This means you could use it as your source or destination, set the base directory to \, and then choose files and folders from multiple drives.

 

ChangeIdentical: This is a runtime script which changes the difference for a file so that if it is considered the same then it is instead changed to appear to only be on the source.

 

CompressCopy: This is a runtime script which will NTFS compress the copies of files if the original file was also NTFS compressed. This should only be used in profiles that copy to and from NTFS partitions.

 

CreateRestorePoint: This is a runtime script which creates a system restore point in Windows whenever the profile is run.

 

DecryptCopy: This is a runtime script which will remove the NTFS encryption from the copy of files. For example, you may have a profile that does a backup from one NTFS partition to another, but you may not want the backup copies to be encrypted. This should only be used in profiles that copy to NTFS partitions. See also the EncryptCopy script.

 

DiffExport: This is a runtime and configuration script which exports the differences between the files and folders. It is comma delimited so can be imported into other software, e.g. a spreadsheet.

 

DiffPrompt: This is a runtime script which adds a voice prompt to the Differences window. Note that after installing it you must configure your profiles to use the script.

 

DiffWindow: This is a runtime script which adds extra columns to the Differences window. Note that after installing it you must configure your profiles to use the script.

 

EncryptCopy: This is a runtime script which will NTFS encrypt the copies of files. For example, you may have a profile that does a backup from one NTFS partition to another, and want the backup copies to be  NTFS encrypted. This should only be used in profiles that copy to NTFS partitions. See also the DecryptCopy script.

 

ExtraInfo: This is both a runtime and main interface script. It adds a column to the main interface that shows how many files were copied, deleted, etc. in the last profile run. Note that after installing it you must both enable it (as a main interface script) and also configure your profiles to use the script.

 

History: This is a main interface script that adds a column to the main interface showing how much history information there is for a profile. The purpose of this example is to demonstrate how to reduce overhead.

 

IncVar: This is a runtime script that shows how to create and use your own variables in a profile, and also how to set when a rescan for a Fast Backup profile should be performed. Edit the script before using it, or use the IncVarEx script instead.

 

IncVarEx: This is the same as the IncVar script, except you can configure it from the profile setup window, so there is no need to edit the script file itself.

 

MOTD: This is a main interface script that shows a "Message of the day". Edit the script before using it.

 

OncePerDay: This is a runtime script that shows how to restrict a profile so that it can only be run at most once per day. You may want to use OncePerDayEx instead as it lets you see if the profile has already run today.

 

OncePerDayEx: This is the same as the OncePerDay script, except you can also see if the profile has already run from the profile setup window.

 

OnlyYesterday: This is a runtime script that ignores any files if the source file has not been modified yesterday. The script is not used if it is a Restore.

 

PreCopyExample: This is a runtime and configuration script that stops a profile from running if a user defined number of files are being copied and/or moved. The script is not used if it is a Restore.

 

SBConstants: This is simply a definition file defining all the constants.

 

SendResultViaSMS: This is a runtime script the sends an SMS if a profile fails. Edit the script before using it or use the SendResultViaSMSEx script instead.

 

SendResultViaSMSEx: This is the same as the SendResultViaSMS script, except you can configure it from the profile setup window, so there is no need to edit the script file itself.

 

SendResultViaTwitter: This is a runtime script the sends a Twitter message after a profile run. Edit the script before using it, or use the SendResultViaTwitterEx script instead. Note: Twitter have since changed their authentication method so this script no longer works and is provided for reference only.

 

SendResultViaTwitterEx: This is the same as the SendResultViaTwitter script, except you can configure it from the profile setup window, so there is no need to edit the script file itself. Note: Twitter have since changed their authentication method so this script no longer works and is provided for reference only.

 

StripZeros: This is a runtime script that shows how to create and use your own variables in a profile. In this example two new variables are created: %NoZeroDay% and %NoZeroMonth%. They are the same as %DAY% and %MONTH% except the leading zero is not included.

 

WaitForFinish.: This is a runtime script that stops a profile from starting until a program has finished (or isn't running). Edit the script before using it or use the WaitForFinishEx script instead.

 

WaitForFinishEx: This is the same as the WaitForFinish script, except you can configure it from the profile setup window, so there is no need to edit the script file itself.

 

TranslateExample.vbs: This script shows how you can internationalize the messages displayed by your script.

 

Versioning.vbs: This is a main interface script that adds a column to the main interface showing if a profile is using versioning. The purpose of this example is to demonstrate how to add columns to the main user interface that show extra information about a profiles settings.

 

 

All Content: 2BrightSparks Pte Ltd © 2003-2017