Variables

<< Click to Display Table of Contents >>

Navigation:  Using SyncBackPro > Technical Reference >

Variables

 

SyncBackPro includes a whole range of variables that can be used in various profile settings, e.g. the Source and Destination. Variables are values which are not known until the profile is run. At runtime the variables are replaced by their value. Note that you can also define your own profile variables at a global level, group level and at the profile level. You can also get values from the registry and Windows.

 

For variables see the following sections:

 

Days

Weeks

Months

Years

Dates

Times

Drives, Files, and Folders

Misc.

Backup email

Emailing the log

Registry

SyncBack Touch

Order of evaluation (precedence)

Important notes

Auto-incrementing variable (%AUTOINC%)

 

 

Examples of variable usage

 

Although variables appear to be complex, they are in fact very simple. Just remember that a variable is replaced with its value when the profile is run. A couple of examples will make it clear:

 

You are the administrator for a number of employees computers and want to create a backup profile that makes a backup of all the users documents. This profile will be imported on each users computer so you don't need to manually create it on each computer. Each user has their own 'My Documents' folder on a computer, so if you set the source folder to one users folder then it wouldn't work for other users (because they have different usernames, so the path would be different). To avoid this you can simply set the source to %CSIDL_PERSONAL%. Now when the profile is run it will replace the %CSIDL_PERSONAL% string with the users My Documents path.

 

You want to backup to a Zip file and use the current date in the filename of the Zip file. To do this simply set your destination (for example) to X:\Backup\%DATE%.Zip

 

 

Variables are user specific

 

Remember that the value of a variable may be user-specific. For example, the variable %CSIDL_PERSONAL% (see the example above) has a different value for each user (because every users has their own My Documents folder). So if you have a profile set to run as a specific user, e.g. via Run As or via the scheduler, then keep in mind that the value returned depends on the user who is running the profile.

 

 

Scripts

 

Variables can be created or changed using scripting, see SBVariables.SetVar

 

 

Windows security and environment variables

 

Windows Vista introduced the concept of elevation, meaning a program run by an administrator didn't run with full privileges unless it requested them and the user explicitly granted them. In Windows terms it is called UAC (User Account Control):

 

 http://windows.microsoft.com/en-us/windows/what-is-user-account-control#1TC=windows-7

 

For example, when SyncBackPro is run you are asked, by Windows, to allow it to run elevated. By running elevated SyncBackPro can copy locked files, for example. One side effect of this is that processes that run elevated, like SyncBackPro and SyncBackSE, cannot access some things that were set by non-elevated processes. For example, using the Windows File Explorer you can map a network drive to a drive letter. Windows File Explorer does not run elevated. When SyncBackPro and SyncBackSE is run it cannot see the mapped drive. This is because of the security introduced in Windows Vista. The same applies to environment variables. If you open a command prompt (not elevated), set an environment variable and then run SyncBackPro or SyncBackSE, it will not be able to see those environment variables. This is also because of the security introduced in Windows Vista. One option is to use SETX to set the variables and the other option would be to run the command prompt elevated.

 

SyncBackFree does not have these Windows security related issues because it does not run elevated.

 

 

Temporary Files

 

By default, SyncBackPro will use the standard Windows temporary directory for all temporary files. If the Windows environment variable %SYNCBACKTEMP% is defined, then the directory it specifies will instead be used. You must ensure the directory exists. For compression, you can specify an alternative directory (overriding any default temporary directory setting).

 

 

Days

 

The following variables are related to days of the week, month, etc:

 

%DAY% Current day of the month, e. g. 10

 

%DAYOFMONTH% Alias for %DAY%

 

%DAYODDEVEN% Odd or even day of the year (O = odd day, E = even day)

 

%DAY_P% Yesterdays day of the month (could be previous month)

 

%DAY_N% Tomorrows day of the month (could be next month)

 

%DAYOFWEEK% Current day of the week, (1 = Monday, 7 = Sunday)

 

%DAYOFWEEK_P% Yesterdays day of the week

 

%DAYOFWEEK_N% Tomorrows day of the week

 

%DAYOFYEAR% Current day of the year (January 1st = 1)

 

%DAYOFYEAR_P% Yesterdays day of the year

 

%DAYOFYEAR_N% Tomorrows day of the year

 

%DAYOFQUARTER% Current day of the current quarter of the year (January 1st, April 1st, July 1st, October 1st = 1)

 

%DAYOFQUARTER_P% Yesterdays day of the quarter of the year

 

%DAYOFQUARTER_P% Tomorrows day of the quarter of the year

 

%NTHDAYOFWEEK% Note that this value may differ from the value that the WeekOfTheMonth variable returns, because NthDayOfWeek counts every occurrence of the given weekday, while WeekOfTheMonth only counts a week if it includes 4 or more days in the month. Thus, for example, if today is a Saturday and is the first day of a month, NthDayOfWeek returns 1, while WeekOfTheMonth returns 5 (or maybe 4), indicating the last week of the previous month.

 

%DAYSINMONTH% Number of days in current month.

 

%DAYSINYEAR% Number of days in current year.

These new variables allow you, for example, to keep 7 days worth of backups, e. g. you could set your destination to D:\Backup\%DAYOFWEEK%\ so that you'll always have backups of the last seven days worth of files.

 

%DAYOFWEEKNAME% The first three letters of the day of the week, e.g. Mon. Note that English is always used.

 

%DAYOFWEEKNAME_P% The first three letters of yesterday

 

%DAYOFWEEKNAME_N% The first three letters of tomorrows

 

%LASTRUNDAY% The day of the month that the profile was last run (empty string if it has not yet been run)

 

%LASTSUCCESSRUNDAY% The day of the month that the profile was last run without error (empty string if it has not yet been run without error)

 

 

Weeks

 

The following variables are related to weeks of the month, year, etc:

 

%WEEKOF% Week of the year (1 to 53). WeekOf uses the ISO 8601 standard to define the week of the year. That is, a week is defined as running from Monday through Sunday, and the first week of the year is defined as the one that includes the first Thursday of the year (the first week that includes four or more days in the year). This means that if the first calendar day of the year is a Friday, Saturday, or Sunday, then for the first three, two, or one days of the calendar year, WeekOf returns the last week of the previous year. Similarly, if the last calendar day of the year is a Monday, Tuesday, or Wednesday, then for the last one, two, or three days of the calendar year, WeekOf returns 1 (the first week of the next calendar year).

 

%WEEKOFODDEVEN% Odd or even week of the year (O = odd week, E = even week)

 

%WEEKOFTHEMONTH% Week of the month (1 to 6). WeekOfTheMonth uses the ISO 8601 standard definition of a week. That is, a week is considered to start on a Monday and end on a Sunday. The first week of a month is defined as the first week with four or more days in that month. Thus, if the first day of the month is a Friday, Saturday, or Sunday, the first one, two, or three days of the month are defined as belonging to the last week of the previous month. Similarly, if the last day of the month is a Monday, Tuesday, or Wednesday, then the last one, two, or three days of the month are defined as belonging to the first week of the next month.

 

%WEEKOFQUARTER% Current week of the current quarter of the year (January 1st, April 1st, July 1st, October 1st = 1)

 

%WEEKOFQUARTER_P% Yesterdays week of the quarter of the year

 

%WEEKOFQUARTER_P% Tomorrows week of the quarter of the year

 

%WEEKSINYEAR% The number of weeks in the year (52 or 53). WeeksInYear defines the first week of the year according to the ISO 8601 standard. That is, the first week of the year is the one that includes the first Thursday of the year (the first week that has 4 or more days in the year). This means that WeeksInYear always returns either 52 or 53.

 

 

Months

 

The following variables are related to months of the year:

 

%MONTH% Current month, e. g. 12

 

%MONTH_P% Previous month

 

%MONTH_N% Next month

 

%MONTH_Y% Yesterdays month

 

%MONTH_T% Tomorrows month

 

%MONTHNAME% The first three letters of the current month, e.g. Jan. Note that English is always used.

 

%MONTHNAME_P% The first three letters of last month

 

%MONTHNAME_N% The first three letters of next month

 

%MONTHNAME_Y% The first three letters of yesterdays month

 

%MONTHNAME_T% The first three letters of tomorrows month

 

%LASTRUNMONTH% The month that the profile was last run (empty string if it has not yet been run)

 

%LASTSUCCESSRUNMONTH% The month that the profile was last run without error (empty string if it has not yet been run without error)

 

%MONTHOFQUARTER% The number of the month of the quarter of the year. For example, January=1, February=2, March=3, April=1, May=2, etc.

 

%MONTHOFQUARTER_P% The number of the previous month of the quarter of the year. For example, if it is April then this returns 3 (for March), and if it is March then it would return 2 (for February).

 

%MONTHOFQUARTER_N% The number of the next month of the quarter of the year. For example, if it is March then this returns 1 (for April), and if it is April then it would return 2 (for May).

 

%MONTHOFQUARTER_Y% The number of yesterdays month of the quarter of the year.

 

%MONTHOFQUARTER_T% The number of tomorrows month of the quarter of the year.

 

 

Years

 

The following variables are related to years:

 

%YEAR% Current year in 4 digits, e. g. 2010

 

%YEAR2% Last two digits of current year, e. g. 09

 

%YEAR_P% Previous year

 

%YEAR_N% Next year

 

%YEAR_Y% Yesterdays year

 

%YEAR_T% Tomorrows year

 

%QUARTEROFYEAR% Returns the current quarter for the current year, i.e. 1 for January to March, 2 for April to June, 3 for July to September, and 4 for October to December.

 

%QUARTEROFYEAR_P% Returns the previous quarter for the current year. For example, if the current quarter is 2 then it returns 1, and if it is 1 then it returns 4.

 

%QUARTEROFYEAR_N% Returns the next quarter for the current year. For example, if the current quarter is 1 then it returns 2, and if it is 4 then it returns 1.

 

%QUARTEROFYEAR_Y% Returns yesterdays quarter for the current year.

 

%QUARTEROFYEAR_T% Returns tomorrows quarter for the current year.

 

%LASTRUNYEAR% The year that the profile was last run (empty string if it has not yet been run)

 

%LASTSUCCESSRUNYEAR% The year that the profile was last run without error (empty string if it has not yet been run without error)

 

 

Dates

 

The following variables are related to dates:

 

%DATE% Current date (it will be in the short date format configured in your installation of Windows)

 

%DATE_P% Yesterdays date

 

%DATE_N% Tomorrows date

 

 

Times

 

The following variables are related to times:

 

%TIME% Current time (it will be in the short time format configured in your installation of Windows)

 

%HOUR% Current hour (24 hour clock format), e. g. 19

 

%MINUTE% Current minute

 

%SECOND% Current second

 

%MILLISECOND% Current millisecond (0 to 999)

 

%HOUROFTHEYEAR% The number of complete hours between the current date & time and 12:00 AM on Jan 1 of the year.

 

%HOUROFTHEMONTH% The number of complete hours between the current date & time and 12:00 AM on the first day of the month.

 

%HOUROFTHEWEEK% The number of complete hours between the current date & time and 12:00 AM on Monday of the week.

 

%MINUTEOFTHEYEAR% The number of minutes between the current date & time and 12:00:00:00 AM on Jan 1 of the year.

 

%MINUTEOFTHEMONTH% The number of minutes between the current date & time and

12:00 AM on the first day of the month.

 

%MINUTEOFTHEWEEK% The number of minutes between the current date & time and 12:00 AM on Monday of the week (the week starts on Monday).

 

%MINUTEOFTHEDAY% The number of minutes between the current date & time and 12:00 AM on the same day.

 

%SECONDOFTHEYEAR% The number of seconds between the current date & time and 12:00:00:00 AM on Jan 1 of the year.

 

%SECONDOFTHEMONTH% The number of seconds between the current date & time and 12:00:00 AM on the first day of the month.

 

%SECONDOFTHEWEEK% The number of seconds between the current date & time and 12:00:00 AM on Monday of the week (the week starts on Monday).

 

%SECONDOFTHEDAY% The number of seconds between the current date & time and 12:00:00 AM on the same day.

 

%SECONDOFTHEHOUR% The number of seconds between the current date & time and the start of the same hour on the same day.

 

%MILLISECONDOFTHEYEAR% The number of milliseconds between the current date & time and 12:00:00:00 AM on Jan 1 of the year.

 

%MILLISECONDOFTHEMONTH% The number of milliseconds between the beginning (Midnight on the first day) of the month and the current date & time.

 

%MILLISECONDOFTHEWEEK% The number of milliseconds between the current date & time and 12:00:00:00 AM on Monday of the current week (the week starts on Monday).

 

%MILLISECONDOFTHEDAY% The number of milliseconds between the current date & time and the beginning (midnight) on the same day.

 

%MILLISECONDOFTHEHOUR% The number of milliseconds between the current time and the start of the same hour on the same day.

 

%MILLISECONDOFTHEMINUTE% The number of milliseconds between the current time and the start of the same minute on the same day.

 

 

Drives, Files, and Folders

 

The following variables are related to drives, files, and folders:

 

%THISDRIVE% The drive that SyncBackPro is running on, e. g. C:

 

%THISPATH% The path that SyncBackPro is running from, e.g. C:\Program Files\2BrightSparks\SyncBackPro\

 

%THISPROGRAM% The path and filename of the SyncBackPro program itself.

 

%SYNCBACKFOLDER% The default local (not roaming) folder that SyncBackPro stores it’s profiles in, e.g. %LOCALAPPDATA%\SyncBack\. Note that this is not necessarily where the user has decided to store his profiles (you may have configured it to store them in %THISPATH%, for example). If SyncBackPro is being run from an external drive then it is the same as %THISPATH%

 

%SYNCBACKBACKUPFOLDER% The default local (not roaming) folder that SyncBackPro stores it’s profile backup files in, e.g. C:\Users\[username]\AppData\Local\2BrightSparks\SyncBackPro\Profiles Backup\. Note that this is not necessarily where the user has decided to store his profile backups. If SyncBackPro is being run from an external drive then it is the same as %THISPATH%Profiles Backup\

 

There are several special variables than can be used to identify drives based on their label or serial number. These are very useful when using external USB drives, for example, which may have a different drive letter each time they are plugged-in:

 

%LABEL=?% The entry is replaced by the drive letter with that label. For example, if your C drive is labeled My Disk then %LABEL=My Disk%Documents would be translated into C:\Documents. Note that you can only use one label per string but can use it multiple times. If more than one drive has the same label then you will receive an error when the profile is run. To ignore the error use the variable %IGNORE_ERR%. Note that it is undefined which drive will be used if there is more than one drive with the same label.

 

%SERIAL=?% The entry is replaced by the drive letter with that serial number. For example, if your D drive has a serial number of BC46-F69E then %SERIAL=BC46-F69E%Program Files will be translated at runtime into D:\Program Files. Note that you can only use one serial per string but can use it multiple times. If more than one drive has the same serial number then you will receive an error when the profile is run. To ignore the error use the variable %IGNORE_ERR%. Note that it is undefined which drive will be used if there is more than one drive with the same serial.

 

%HWSERIAL=?% The entry is replaced by the drive letter with that hardware serial number. There are important differences between the hardware serial number and the volume (also called a partition) serial number used by the variables SERIAL and DISKSERIAL. The volume serial number is changed every time a volume is formatted. However, the hardware serial number is stored in the drive hardware itself and never changes. Another important difference is that the hardware serial number is the same for all volumes on a physical drive. For example, if you have a hard drive you could have two volumes on it, e.g. C: and D:. The hardware serial numbers for the volumes C: and D: will be identical because they are stored on the same physical drive. Because of this you should not use a hardware serial number if there is more than one volume on the drive (because which volume is returned is undefined in that case). If the drive is one of two or more connected to a RAID controller then the RAID controller will likely (but not guaranteed) return the serial number of the first available drive in the RAID array. Note that you can only use one serial per string but can use it multiple times. If more than one drive has the same hardware serial then you will receive an error when the profile is run. To ignore the error use the variable %IGNORE_ERR%. Note that it is undefined which drive will be used if there is more than one drive with the same hardware serial.

 

%IGNORE_ERR% This is a special variable than can be used with %LABEL=%, %SERIAL=?% and %HWSERIAL=?%. When two or more drives have the same label or serial, then SyncBack will not start the profile. This is to avoid potential problems as there is no way to know which drive to use. If you do not care which drive is used then simply use this variable anywhere in the path, e.g. %IGNORE_ERR%%LABEL=My Disk%Documents

 

%LABELOF=?% Returns the label of the specified drive. For example, %LABELOF=C% would be replace by the label of drive C:. This variable was introduced with V11.

 

%SERIALOF=?% Returns the volume serial number of the specified drive. For example, %SERIALOF=D% would be replace by the volume serial number of drive D:. This variable was introduced with V11.

 

%HWSERIALOF=?% Returns the hardware serial number of the specified drive. For example, %HWSERIALOF=E% would be replace by the hardware serial number of drive E:. See %HWSERIAL=?% above for details on hardware serial numbers. This variable was introduced with V11.

 

%DISKLABEL% The label of the disk (volume) in the drive. This uses the beginning of the string to be expanded as the drive. For example, if you have the destination as D:\%DISKLABEL% then the DISKLABEL variable is replaced by the label of the D: drive. This variable cannot be used in the email log text body. To get the label of a specific drive, use %LABELOF=?% (see above for details).

 

%DISKSERIAL% The unique serial number of the disk (volume) in the drive. See DISKLABEL above for notes on how it is used. This variable cannot be used in the email log text body. To get the serial number of a specific drive, use %SERIALOF=?% (see above for details).

 

%DISKHWSERIAL% The hardware serial number of the drive. Note that if the hardware serial number cannot be retrieved then the variable is not expanded. See DISKLABEL above for notes on how it is used. This variable cannot be used in the email log text body. To get the hardware serial of a specific drive, use %HWSERIALOF=?% (see above for details).

 

warning

If you use the LABEL, SERIAL or HWSERIAL variables in your profiles source/left or destination/right path, then SyncBackPro will check if two or more drives share the same serial or label. If so, the profile run will fail to run and give an error, e.g. The following drives share the same volume label.

 

%SMARTSTATUSSRC% If the profile is configured to log the S.M.A.R.T. status of the drives then this variable is set with the S.M.A.R.T. status of the source/left drive (sbpro-feature-16x16 Pro version). The variable is set just before scanning for changes begins.

 

%SMARTSTATUSDEST% If the profile is configured to log the S.M.A.R.T. status of the drives then this variable is set with the S.M.A.R.T. status of the destination/right drive (sbpro-feature-16x16 Pro version). The variable is set just before scanning for changes begins.

 

%DROPBOX% If you have Dropbox installed then this is the path to your Dropbox files, e.g. C:\Users\[username]\Dropbox\. If you do not have Dropbox installed then it is an empty string. This variable was introduced with V11.

 

 

If you cannot find the relevant path using a CSIDL variable, see the FOLDERID variables below:

 

%CSIDL_DESKTOP% The virtual folder representing the Windows desktop, the root of the namespace.

 

%CSIDL_PROGRAMS% The file system directory that contains the user's program groups (which are themselves file system directories). A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\

 

%CSIDL_PERSONAL% The virtual folder representing the My Documents desktop item. A typical path is C:\Users\[username]\Documents\

 

%CSIDL_FAVORITES% The file system directory that serves as a common repository for the user's favorite items. A typical path is C:\Users\[username]\Favorites\

 

%CSIDL_STARTUP% The file system directory that corresponds to the user's Startup program group. The system starts these programs whenever any user logs onto Windows. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\

 

%CSIDL_RECENT% The file system directory that contains shortcuts to the user's most recently used documents. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Recent\

 

%CSIDL_SENDTO% The file system directory that contains Send To menu items. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\SendTo\

 

%CSIDL_STARTMENU% The file system directory containing Start menu items. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Start Menu\

 

%CSIDL_DESKTOPDIRECTORY% The file system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself). A typical path is C:\Users\[username]\Desktop\

 

%CSIDL_NETHOOD% A file system directory containing the link objects that may exist in the My Network Places virtual folder. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Network Shortcuts\

 

%CSIDL_FONTS% A virtual folder containing fonts. A typical path is C:\Windows\Fonts\

 

%CSIDL_TEMPLATES% The file system directory that serves as a common repository for document templates. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Templates\

 

%CSIDL_COMMON_STARTMENU% The file system directory that contains the programs and folders that appear on the Start menu for all users. A typical path is C:\ProgramData\Microsoft\Windows\Start Menu\

 

%CSIDL_COMMON_PROGRAMS% The file system directory that contains the directories for the common program groups that appear on the Start menu for all users. A typical path is C:\ProgramData\Microsoft\Windows\Start Menu\Programs\

 

%CSIDL_COMMON_STARTUP% The file system directory that contains the programs that appear in the Startup folder for all users. A typical path is C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\

 

%CSIDL_COMMON_DESKTOPDIRECTORY% The file system directory that contains files and folders that appear on the desktop for all users. A typical path is C:\Users\Public\Desktop\

 

%CSIDL_APPDATA% The file system directory containing application data for all users. A typical path is C:\Users\[username]\AppData\Roaming\

 

%CSIDL_PRINTHOOD% The file system directory that contains the link objects that can exist in the Printers virtual folder. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Printer Shortcuts\

 

%CSIDL_LOCAL_APPDATA% The file system directory that serves as a data repository for local (non-roaming) applications. A typical path is C:\Users\[username]\AppData\Local\

 

%CSIDL_ALTSTARTUP% The file system directory that corresponds to the user's non-localized Startup program group. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\

 

%CSIDL_COMMON_ALTSTARTUP% The file system directory that corresponds to the non-localized Startup program group for all users. A typical path is C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\

 

%CSIDL_COMMON_FAVORITES% The file system directory that serves as a common repository for favorite items common to all users. A typical path is C:\Users\[username]\Favorites\

 

%CSIDL_INTERNET_CACHE% The file system directory that serves as a common repository for temporary Internet files. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\INetCache\

 

%CSIDL_COOKIES% The file system directory that serves as a common repository for Internet cookies. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\INetCookies\

 

%CSIDL_HISTORY% The file system directory that serves as a common repository for Internet history items. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\History\

 

%CSIDL_PROFILE% The user's profile folder. A typical path is C:\Users\[username]\

 

%CSIDL_COMMON_MUSIC% The file system directory that serves as a repository for music files common to all users. A typical path is C:\Users\Public\Music\

 

%CSIDL_MYMUSIC% The users music files folder. A typical path is C:\Users\[username]\Music\

 

%CSIDL_COMMON_PICTURES% The file system directory that serves as a repository for image files common to all users. A typical path is C:\Users\Public\Pictures\

 

%CSIDL_MYPICTURES% The users image files folder. A typical path is C:\Users\[username]\Pictures\

 

%CSIDL_COMMON_VIDEO% The file system directory that serves as a repository for video files common to all users. A typical path is C:\Users\Public\Videos\

 

%CSIDL_MYVIDEO% The users video files folder. A typical path is C:\Users\[username]\Videos\

 

%CSIDL_CDBURN_AREA% The file system directory acting as a staging area for files waiting to be written to CD. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\Burn\Burn\

 

%CSIDL_WINDOWS% The Windows directory. This corresponds to the %windir% or %SYSTEMROOT% environment variables. A typical path is C:\Windows

 

%CSIDL_SYSTEM% The Windows System folder. A typical path is C:\Windows\System32 for both 32-bit and 64-bit versions of Windows.

 

%CSIDL_SYSTEMX86% The 32-bit Windows System folder (even if you are using 64-bit Windows). For 64-bit versions of Windows this may be C:\Windows\SYSWOW64

 

%CSIDL_PROGRAM_FILES% The program files folder. A typical path is C:\Program Files for both 32-bit and 64-bit versions of Windows.

 

%CSIDL_PROGRAM_FILESX86% The 32-bit program files folder (even if you are using 64-bit Windows). For 32-bit versions of Windows it is C:\Program Files and C:\Program Files (x86) for 64-bit versions of Windows.

 

%CSIDL_PROGRAM_FILES_COMMON% A folder for components that are shared across applications. A typical path is C:\Program Files\Common. Valid only for Windows XP (which is not supported).

 

%CSIDL_PROGRAM_FILES_COMMONX86% The folder for 32-bit components that are shared across applications (even if you are using 64-bit Window). Valid only for Windows XP (which is not supported).

 

%CSIDL_COMMON_APPDATA% The file system directory containing application data for all users. A typical path is C:\ProgramData\

 

%CSIDL_2BS_APPDATA% This is the same as %SYNCBACKFOLDER% and %CSIDL_2BS_LOCAL_APPDATA%

 

%CSIDL_2BS_LOCAL_APPDATA% This is the same as %SYNCBACKFOLDER% and %CSIDL_2BS_APPDATA%

 

%CSIDL_2BS_ROAM_APPDATA% The default roaming (not local) folder that SyncBackPro would store it’s profiles. This is not necessarily where the user has decided to store the profiles.

 

%CSIDL_2BS_APPDATA_PROFILESBACKUP% This is the same as %SYNCBACKBACKUPFOLDER% and %CSIDL_2BS_LOCAL_APPDATA_PROFILESBACKUP%

 

%CSIDL_2BS_LOCAL_APPDATA_PROFILESBACKUP% This is the same as %SYNCBACKBACKUPFOLDER% and %CSIDL_2BS_APPDATA_PROFILESBACKUP%

 

%CSIDL_2BS_ROAM_APPDATA_PROFILESBACKUP% The default roaming (not local) folder that SyncBackPro would store backups of profiles. This is not necessarily where the user has decided to store the profile backups.

 

 

The FOLDERID variables were introduced in SyncBack V10. They provide access to folders that are not covered by the CSIDL variables (above).

 

%FOLDERID_ACCOUNTPICTURES% Account Pictures. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\AccountPictures\. This variable was introduced in V10.

 

%FOLDERID_ADMINTOOLS% Administrative Tools. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools\. This variable was introduced in V10.

 

%FOLDERID_APPDATADESKTOP% Application Data Desktop. A typical path is C:\Users\[username]\AppData\Local\Desktop\. This variable was introduced in V10.

 

%FOLDERID_APPDATADOCUMENTS% Application Data Documents. A typical path is C:\Users\[username]\AppData\Local\Documents\. This variable was introduced in V10.

 

%FOLDERID_APPDATAFAVORITES% Application Data Favorites. A typical path is C:\Users\[username]\AppData\Local\Favorites\. This variable was introduced in V10.

 

%FOLDERID_APPDATAPROGRAMDATA% Application Data Program Data. A typical path is C:\Users\[username]\AppData\Local\ProgramData\. This variable was introduced in V10.

 

%FOLDERID_APPLICATIONSHORTCUTS% Application Shortcuts. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\Application Shortcuts\. This variable was introduced in V10.

 

%FOLDERID_CAMERAROLL% Camera Roll. A typical path is C:\Users\[username]\Pictures\Camera Roll\. This variable was introduced in V10.

 

%FOLDERID_CONTACTS% Contacts. A typical path is C:\Users\[username]\Contacts\. This variable was introduced in V10.

 

%FOLDERID_DEVICEMETADATASTORE% Device Metadata Store. A typical path is C:\ProgramData\Microsoft\Windows\DeviceMetadataStore\. This variable was introduced in V10.

 

%FOLDERID_DOCUMENTSLIBRARY% Documents. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms\. This variable was introduced in V10.

 

%FOLDERID_DOWNLOADS% Downloads. A typical path is C:\Users\[username]\Downloads\. This variable was introduced in V10.

 

%FOLDERID_GAMETASKS% Game Explorer. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\GameExplorer\. This variable was introduced in V10.

 

%FOLDERID_IMPLICITAPPSHORTCUTS% Implicit Application Shortcuts. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\ImplicitAppShortcuts\. This variable was introduced in V10.

 

%FOLDERID_LIBRARIES% Libraries. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Libraries\. This variable was introduced in V10.

 

%FOLDERID_LINKS% Links. A typical path is C:\Users\[username]\Links\. This variable was introduced in V10.

 

%FOLDERID_LOCALAPPDATALOW% Local Application Data (Low). A typical path is C:\Users\[username]\AppData\LocalLow\. This variable was introduced in V10.

 

%FOLDERID_MUSICLIBRARY% Music. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Libraries\Music.library-ms\. This variable was introduced in V10.

 

%FOLDERID_OBJECTS3D% 3D Objects. A typical path is C:\Users\[username]\3D Objects\. This variable was introduced in V10.

 

%FOLDERID_ORIGINALIMAGES% Original Images. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows Photo Gallery\Original Images\. This variable was introduced in V10.

 

%FOLDERID_PHOTOALBUMS% Slide Shows. A typical path is C:\Users\[username]\Pictures\Slide Shows\. This variable was introduced in V10.

 

%FOLDERID_PICTURESLIBRARY% Pictures. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Libraries\Pictures.library-ms\. This variable was introduced in V10.

 

%FOLDERID_PLAYLISTS% Playlists. A typical path is C:\Users\[username]\Music\Playlists\. This variable was introduced in V10.

 

%FOLDERID_PUBLIC% Public. A typical path is C:\Users\Public\. This variable was introduced in V10.

 

%FOLDERID_PUBLICDOWNLOADS% Public Downloads. A typical path is C:\Users\Public\Downloads\. This variable was introduced in V10.

 

%FOLDERID_PUBLICGAMETASKS% Game Explorer. A typical path is C:\ProgramData\Microsoft\Windows\GameExplorer\. This variable was introduced in V10.

 

%FOLDERID_PUBLICLIBRARIES% Libraries. A typical path is C:\Users\Public\Libraries\. This variable was introduced in V10.

 

%FOLDERID_PUBLICRINGTONES% Ringtones. This variable was introduced in V10.

 

%FOLDERID_PUBLICUSERTILES% Public Account Pictures. A typical path is C:\Users\Public\AccountPictures\. This variable was introduced in V10.

 

%FOLDERID_QUICKLAUNCH% Quick Launch. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\. This variable was introduced in V10.

 

%FOLDERID_RECORDEDTVLIBRARY% Recorded TV. A typical path is C:\Users\Public\Libraries\RecordedTV.library-ms\. This variable was introduced in V10.

 

%FOLDERID_RINGTONES% Ringtones. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\Ringtones\. This variable was introduced in V10.

 

%FOLDERID_ROAMEDTILEIMAGES% Roamed Tile Images. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\RoamedTileImages\. This variable was introduced in V10.

 

%FOLDERID_ROAMINGTILES% Roaming Tiles. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\RoamingTiles\. This variable was introduced in V10.

 

%FOLDERID_SAMPLEMUSIC% Sample Music. A typical path is C:\Users\Public\Music\Sample Music\. This variable was introduced in V10.

 

%FOLDERID_SAMPLEPICTURES% Sample Pictures. A typical path is C:\Users\Public\Pictures\Sample Pictures\. This variable was introduced in V10.

 

%FOLDERID_SAMPLEVIDEOS% Sample Videos. A typical path is C:\Users\Public\Videos\Sample Videos\. This variable was introduced in V10.

 

%FOLDERID_SAVEDGAMES% Saved Games. A typical path is C:\Users\[username]\Saved Games\. This variable was introduced in V10.

 

%FOLDERID_SAVEDPICTURES% Saved Pictures. This variable was introduced in V10.

 

%FOLDERID_SAVEDPICTURESLIBRARY% Saved Pictures Library. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Libraries\SavedPictures.library-ms\. This variable was introduced in V10.

 

%FOLDERID_SAVEDSEARCHES% Searches. A typical path is C:\Users\[username]\Searches\. This variable was introduced in V10.

 

%FOLDERID_SCREENSHOTS% Screenshots. A typical path is C:\Users\[username]\Pictures\Screenshots\. This variable was introduced in V10.

 

%FOLDERID_SEARCHHISTORY% History. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\ConnectedSearch\History\. This variable was introduced in V10.

 

%FOLDERID_SEARCHTEMPLATES% Templates. A typical path is C:\Users\[username]\AppData\Local\Microsoft\Windows\ConnectedSearch\Templates\. This variable was introduced in V10.

 

%FOLDERID_SKYDRIVE% OneDrive. A typical path is C:\Users\[username]\OneDrive\. This variable was introduced in V10.

 

%FOLDERID_SKYDRIVECAMERAROLL% Camera Roll (on OneDrive). A typical path is C:\Users\[username]\OneDrive\Pictures\Camera Roll\. This variable was introduced in V10.

 

%FOLDERID_SKYDRIVEDOCUMENTS% Documents (on OneDrive). A typical path is C:\Users\[username]\OneDrive\Documents\. This variable was introduced in V10.

 

%FOLDERID_SKYDRIVEPICTURES% Pictures (on OneDrive). A typical path is C:\Users\[username]\OneDrive\Pictures\. This variable was introduced in V10.

 

%FOLDERID_USERPINNED% User Pinned. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\. This variable was introduced in V10.

 

%FOLDERID_USERPROFILES% Users. A typical path is C:\Users\. This variable was introduced in V10.

 

%FOLDERID_USERPROGRAMFILES% Programs. A typical path is C:\Users\[username]\AppData\Local\Programs\. This variable was introduced in V10.

 

%FOLDERID_USERPROGRAMFILESCOMMON% Programs. A typical path is C:\Users\[username]\AppData\Local\Programs\Common\. This variable was introduced in V10.

 

%FOLDERID_VIDEOSLIBRARY% Videos. A typical path is C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Libraries\Videos.library-ms\. This variable was introduced in V10.

 

 

Misc.

 

%SBVERSION% The complete version number of the SyncBackPro program itself, e.g. 9.0.3.0

 

%SBLATESTVERSION% The complete version number of the latest version of SyncBackPro, e.g. 9.1.7.0. IMPORTANT: This will check online what the latest version number is so an Internet connection is required. The latest version number is cached and not updated more than once every 30 minutes.

 

%SBNEWVERSION% Returns Y if a newer version of SyncBackPro is available for download else returns N. IMPORTANT: This will check online what the latest version number is so an Internet connection is required. An update check is not performed more than once every 30 minutes.

 

%PROFILENAME% The profile name. This can be used in the source/left and/or destination/right path.

 

%GROUPNAME% The group name. This can be used in the source/left and/or destination/right path. If the profile is not being run as part of a group then the value returned is an empty string. See also %VISUALGROUPNAME%

 

%ISINTEGRITYCHECK% If the current profile run is a file integrity check run, then Y is returned, else N. This variable is new to V8.

 

%CONTAINERMOUNT% If a VHD/X file is being used, then this is the path where the container is mounted. This is typically used in the source or destination path. This variable is new to V8.

 

%CRLF% Replaced with ASCII 13 (Carriage Return) and ASCII 10 (Line Feed). This is used to end a line and start a new one in Windows. This variable name is case-sensitive, so you cannot use %crlf%, for example. This variable is new to V9.3.7.0.

 

%CR% Replaced with ASCII 13 (Carriage Return). This variable name is case-sensitive. This variable is new to V9.3.7.0.

 

%LF% Replaced with ASCII 10 (Line Feed). This variable name is case-sensitive. This variable is new to V9.3.7.0.

 

 

Backup email

 

Some special variables can be used in the EML filename and sub-folder when performing a backup of email (Pro version only).

 

%EMAIL_ID% Unique email message ID. The format is decided by the email server. Note that this value can be empty so you may wish to use EMAIL_IDORMD5 instead.

 

%EMAIL_MD5% The MD5 hash value of the email header.

 

%EMAIL_IDORMD5% If the email has a message ID, then it is the message ID, otherwise it is the MD5 hash value of the header.

 

%EMAIL_UIDL% MD5 hash value of unique email ID, also called the UIDL. Note that it is unique for the email folder it is in. For POP3 this is ENVSPECIAL_S_EMAIL_IDORMD5 as POP3 does not have unique UIDL values for emails.

 

%EMAIL_SUBJECT% Email subject. Note that the subject can be very long, so it is recommended that you let SyncBackPro truncate it by using %EMAIL_SUBJECT32% or %EMAIL_SUBJECT64%

 

%EMAIL_SUBJECT32% The first 32 characters of the email subject.

 

%EMAIL_SUBJECT64% The first 64 characters of the email subject.

 

%EMAIL_SIZE% Size of email in bytes. This is not the size of the EML file.

 

%EMAIL_DATE% Date email sent. The format used is the short date format set in Windows.

 

%EMAIL_TIME% Time email sent. The format used is the long time format set in Windows.

 

%EMAIL_DATEYEAR% Date email sent (year).

 

%EMAIL_DATEMONTH% Date email sent (month). This is always two digits, e.g. 03 for April.

 

%EMAIL_DATEDAY% Date email sent (day). This is always two digits, e.g. 05 for the 5th day of the month.

 

%EMAIL_DATEHOUR% Date email sent (hour) in 24-hour format. This is always two digits, e.g. 09 for 9am.

 

%EMAIL_DATEMIN% Date email sent (minute). This is always two digits, e.g. 05 for 5 minutes past the hour.

 

%EMAIL_DATESEC% Date email sent (second). This is always two digits, e.g. 03 for 3 seconds past the minute.

 

%EMAIL_FROMNAME% From friendly name. If there is no sender's friendly name then the email address is returned (as per %EMAIL_FROMADDRESS%).

 

%EMAIL_FROMADDRESS% From email address.

 

%EMAIL_REPLYTO% Email address to reply to.

 

%EMAIL_FIRSTTONAME% To friendly name (of first recipient). Note that an email can be sent to more than one person, so this refers to the first person in the To list. If there is no friendly name then the email address is returned (as per %EMAIL_FIRSTTOADDRESS%).

 

%EMAIL_FIRSTTOADDRESS% To email address (of first recipient). Note that an email can be sent to more than one email address, so this refers to the first email address in the To list.

 

%EMAIL_IMAPFOLDER% The name of the IMAP4/Exchange folder the email is being retrieved from. Note that this will be an empty string if POP3 is being used. The value is modified to ensure it is a valid Windows file/folder name. This means it can be used in the EML filename and sub-folder settings. Starting with SyncBackPro V7 you can backup multiple email folders in the same profile, so this value may change during the profile run.

 

 

Emailing the log and late setting variables

 

There are a number of special variables that cannot be used in the source or destination settings, for example, because their value is not set until the profile is run (or at some later stage during the profile run). Some variables values are not set until near the end of a profile run. Because of this they can only be used correct in certain settings, e.g. the email body.

 

%_SOURCE% The source/left path. This is the raw unexpanded value, which is then expanded at time of evaluation. A better alternative is to use %ACTUALSOURCE%.

 

%ACTUALSOURCE% The actual expanded source/left path. Note that if you are doing a restore then this will be your profiles destination path.

 

%_DESTINATION% The destination/right path. This is the raw unexpanded value, which is then expanded at time of evaluation. A better alternative is to use %ACTUALDEST%.

 

%ACTUALDEST% The actual expanded destination/right path. Note that if you are doing a restore then this will be your profiles source path.

 

%LOGFILENAME% Filename of first page of latest log file. This is not set until the log file is closed, so it can only be used in Run After when the profile has been configured to run the 'after' program after the log file has been closed.

 

%SNAPSOURCE% If a shadow volume is being used to copy locked files from the source/left then this is the path of that shadow volume.

 

%SNAPDEST% If a shadow volume is being used to copy locked files from the destination/right then this is the path of that shadow volume.

 

%VISUALGROUPNAME% If the profile is part of a group, and it is run on its own from the main user interface (not necessarily as part of the group), then this is the name of the group. It is different from %GROUPNAME% because that value is only set if it is run as part of a group.

 

%ISFULLBACKUP% If this is a full-backup, i.e. a rescan is being done of the destination, then this is Y, else N

 

%ISUNATTENDED% If this is an unattended profile run then Y is returned, else N

 

%ISRESTORE% If this is a restore then Y is returned, else N

 

%ISSIMULATION% If this is a simulated run then Y is returned, else N

 

%RUNRESULT% A textual description of the result of the profile run, e.g. Success, Failure, Aborted, Timelimit Reached, etc.

 

%PROFILEFAILED% If the profile run was a success then 0 is returned, else 1 is returned on error/abort (this is the same variable that can be used in Run After).

 

%ATTACHMENTSTOTAL% The total number of attachments for the email.

 

%CRITICALERROR% If there was a critical error then this is the error message, otherwise it is an empty string.

 

%DELETEDTOTAL% The total number of files that were deleted.

 

%SKIPPEDTOTAL% The total number of files that were skipped, e.g. only in the destination and the profile was configured to ignore files that are only in the destination.

 

%COPIEDTOTAL% The total number of files that were copied.

 

%MOVEDTOTAL% The total number of files that were moved.

 

%DATECHANGEDTOTAL% The total number of files whose last modification date & time were copied.

 

%ATTRIBCHANGEDTOTAL% The total number of files whose attributes were copied.

 

%SECURITYCHANGEDTOTAL% The total number of files and folders whose security was changed.

 

%RUNBEFOREERROR% If the Run Before program failed (e.g. because it doesn't exist, or couldn't be started) then this is the error message.

 

%RUNAFTERERROR% If the Run After program failed (e.g. because it doesn't exist, or couldn't be started) then this is the error message.

 

%COPYERRORSTOTAL% The total number of file copy/delete errors.

 

%COMPRESSERRORSTOTAL% The total number of errors related to compression.

 

%NONCRITICALERRORSTOTAL% The total number of non-critical errors. Starting with V9, this always returns 0. Use %WARNINGSTOTAL% instead.

 

%WARNINGSTOTAL% The total number of warnings.

 

%STARTTIME% The date & time the profile was ready to run. If the profile was started as a part of a group then the date & time returned by this variable is not necessarily the date & time the profile actually started (for that see %STARTTIME2%). When a group (that is set to run profiles serially and not in parallel) is run SyncBackPro prepares all the profiles in the group so they can be started immediately once the proceeding profile has finished. So the %STARTTIME% value is the date & time when the profile was prepared but not necessarily started. To get the date & time when the profile was actually started use the variable %STARTTIME2%. If the profile is not part of a group then the time returned by %STARTTIME% and %STARTTIME2% will be almost identical. To get the date & time when the group was started (if the profile was run as part of a group) use the variable %GROUPSTARTTIME%. If you ran a group with just one profile in it then the times returned by %STARTTIME%, %STARTTIME2%, and %GROUPSTARTTIME% would be almost identical.

 

%STARTTIME2% The date & time the profile actually started to run. See %STARTTIME% for an explanation of the differences between that variable and this.

 

%GROUPSTARTTIME% The date & time when the (root) group started. If the profile is not part of a group then an empty string is returned. You can have groups within groups, so this is the date & time when the root group started. To get the date & time when the profile started see %STARTTIME% and %STARTTIME2%. See %STARTTIME% for an explanation of the differences between the three start time variables.

 

%ENDTIME% The date & time the profile completed.

 

%TOTALTIME% The amount of time between %STARTTIME% and %ENDTIME%, e.g. 5 hours 15 mins. 30 secs. This value isn't set until just before the log file is closed.

 

%TOTALTIME2% The amount of time between %STARTTIME2% and %ENDTIME%. This value isn't set until just before the log file is closed.

 

%STARTSCANTIME% The date & time the scan for changes started.

 

%ENDSCANTIME% The date & time the scan for changed ended.

 

%TOTALSCANTIME% The amount of time between %STARTSCANTIME% and %ENDSCANTIME%, e.g. 3 mins. 2 secs.

 

%TOTALPAUSETIME% Total time (in seconds) the profile was paused. The variable is not set until just before the log file is created.

 

%BYTESCOPIED% The total number of bytes that were copied. See also %KBYTESCOPIED% and %MBYTESCOPIED%.

 

%KBYTESCOPIED% The total number of kilobytes that were copied. This is a whole (integer) number that is rounded up or down as appropriate.

 

%MBYTESCOPIED% The total number of megabytes that were copied. This is a whole (integer) number that is rounded up or down as appropriate.

 

%BYTESDELETED% The total number of bytes that were deleted. See also %KBYTESDELETED% and %MBYTESDELETED%.

 

%KBYTESDELETED% The total number of kilobytes that were deleted. This is a whole (integer) number that is rounded up or down as appropriate.

 

%MBYTESDELETED% The total number of megabytes that were deleted. This is a whole (integer) number that is rounded up or down as appropriate.

 

%BYTESREPLACED% The total number of bytes that were replaced/overwritten. See also %KBYTESREPLACED% and %MBYTESREPLACED%.

 

%KBYTESREPLACED% The total number of kilobytes that were replaced/overwritten. This is a whole (integer) number that is rounded up or down as appropriate.

 

%MBYTESREPLACED% The total number of megabytes that were replaced/overwritten. This is a whole (integer) number that is rounded up or down as appropriate.

 

%COMPAREFILES% The total number of unique files that SyncBack has found (source/left and destination/right combined). This excludes filtered out files and other files not included based on the profile settings. If a file is in both the source and destination then it only counts as one file. For example, if there are 3 files in the source/left and 2 files in the destination/right (which are the same as the source files) then %COMPAREFILES% will be 3. An alternative way to think of this is that it's the number of files shown in the Differences window (with no display filtering).

 

%COMPAREDIRS% The total number of unique directories that SyncBack has found (source/left and destination/right combined). This excludes filtered out directories and other directories not included based on the profile settings. Note that the base directory itself counts as a directory, so the value will be 1 at a minimum. If a directory is in both the source/left and destination/right then it only counts as one directory. For example, if there are 3 directories in the source/left and 2 directories in the destination/right (which are the same as the source/left directories) then %COMPAREDIRS% will be 4 (the base directory plus the 3 unique directories).

 

%COMPARECHANGEDTOTAL% The total number of files that have changed.

 

%COMPAREHASHCHANGEDTOTAL% The total number of files which have different hash values.

 

%COMPAREDESTONLYTOTAL% The total number of files in the destination only.

 

%COMPARESOURCEONLYTOTAL% The total number of files in the source only.

 

%COMPAREBOTHTOTAL% The total number of files in both the source and destination.

 

%COMPAREDATETIMETOTAL% The total number of files whose last modification date & time is different.

 

%COMPARECREATEDATETIMETOTAL% The total number of files whose creation modification date & time is different.

 

%COMPAREACCESSDATETIMETOTAL% The total number of files whose last access date & time is different. This variable was introduced in V10.

 

%COMPARENTFSSECURITYTOTAL% The total number of files NTFS file security is different.

 

%COMPARESIZETOTAL% The total number of files whose size is different.

 

%COMPAREATTRIBTOTAL% The total number of files whose attributes are different.

 

%COMPARECASETOTAL% The total number of files whose filename case are different, e.g. the source file is called ABC and the destination file is called abc.

 

%COMPAREHASHERRORTOTAL% The total number of files whose hash value could not be calculated to compare them.

 

%TOSKIPCNT% The number of files that are going to be skipped.

 

%TOPROMPTCNT% The number of files where the user will be prompted on the action to take.

 

%TODELETESRCCNT% The total number of files that are to be deleted from the source/left. Files that are to be moved to the destination/right do not count.

 

%TODELETESRCONLYCNT% The total number of files that are to be deleted from the source/left that are only on the source/left. Files that are to be moved to the destination/right do not count. This is different from %TODELETESRCCNT% because it does not include files that are both in the source/left and destination/right.

 

%TODELETEDESTCNT% The total number of files that are to be deleted from the destination/right. Files that are to be moved to the source/left do not count.

 

%TODELETEDESTONLYCNT% The total number of files that are to be deleted from the destination/right that are only on the destination/right. Files that are to be moved to the source/left do not count. This is different from %TODELETEDESTCNT% because it does not include files that are both in the source/left and destination/right.

 

%TODELETEBOTHCNT% The total number of files that are to be deleted from both the source/left and destination/right. Files that are to be moved do not count.

 

%TOCOPYTODESTCNT% The number of files to be copied to the destination/right.

 

%TOCOPYTOSRCCNT% The number of files to be copied to the source/left.

 

%TOMOVETODESTCNT% The number of files to be moved to the destination/right.

 

%TOMOVETOSRCCNT% The number of files to be moved to the source/left.

 

%TOREPLACEDESTCNT% The number of files to be replaced on the destination/right. This variable is new to V8.

 

%TOREPLACESRCCNT% The number of files to be replaced on the source/left. This variable is new to V8.

 

%TOCHANGESRCATTRIBSCNT% The number of files in the source/left that will have their attributes/date & time changed.

 

%TOCHANGEDESTATTRIBSCNT% The number of files in the destination/right that will have their attributes/date & time changed.

 

%TORENAMESRCCNT% The number of files in the source/left that will be renamed.

 

%TORENAMEDESTCNT% The number of files in the destination/right  that will be renamed.

 

%BYTESCOPYTOSRC% The total number of bytes to be copied (includes moved files) to the source/left.

 

%KBYTESCOPYTOSRC% The total number of kilobytes to be copied (includes moved files) to the source/left. This is a whole (integer) number that is rounded up or down as appropriate.

 

%MBYTESCOPYTOSRC% The total number of megabytes to be copied (includes moved files) to the source/left. This is a whole (integer) number that is rounded up or down as appropriate.

 

%BYTESCOPYTODEST% The total number of bytes to be copied (includes moved files) to the destination/right.

 

%KBYTESCOPYTODEST% The total number of kilobytes to be copied (includes moved files) to the destination/right. This is a whole (integer) number that is rounded up or down as appropriate.

 

%MBYTESCOPYTODEST% The total number of megabytes to be copied (includes moved files) to the destination/right. This is a whole (integer) number that is rounded up or down as appropriate.

 

%BYTESDELETEFROMSRC% The total number of bytes to be deleted (includes moved files) from the source/left.

 

%KBYTESDELETEFROMSRC% The total number of kilobytes to be deleted (includes moved files) from the source/left. This is a whole (integer) number that is rounded up or down as appropriate.

 

%MBYTESDELETEFROMSRC% The total number of megabytes to be deleted (includes moved files) from the source/left. This is a whole (integer) number that is rounded up or down as appropriate.

 

%BYTESDELETEFROMDEST% The total number of bytes to be deleted (includes moved files) from the destination/right.

 

%KBYTESDELETEFROMDEST% The total number of bytes to be deleted (includes moved files) from the destination/right. This is a whole (integer) number that is rounded up or down as appropriate.

 

%MBYTESDELETEFROMDEST% The total number of bytes to be deleted (includes moved files) from the destination/right. This is a whole (integer) number that is rounded up or down as appropriate.

 

%PAGE% Used only in log filename.

 

%COMPAREDIRSCHANGEDTOTAL% The number of directories that have been changed.

 

%COMPAREDIRSDESTONLYTOTAL% The number of directories that are only in the destination.

 

%COMPAREDIRSSOURCEONLYTOTAL% The number of directories that are only in the source.

 

%FTPCONNECTCNT% The number of (re)connections made to the FTP server.

 

%VERSIONSRESTOREDTOTAL% The total number of versions restored.

 

%VERSIONSCREATEDTOTAL% The total number of versions created. This variable was introduced with V10.

 

%VERSIONSCREATEDSRC% The total number of versions created in the source. This variable was introduced with V10.

 

%VERSIONSCREATEDDEST% The total number of versions created in the destination. This variable was introduced with V10.

 

%COMPAREUNCHANGEDTOTAL% The total number of unchanged files

 

%TORESTOREVERSRCCNT% The total number of versions files to be restored on the source/left

 

%TORESTOREVERDESTCNT% The total number of versions files to be restored on the destination/right

 

%FREEBYTESSOURCEBEFORE% The number of free bytes on the source/left before the profile started copying, moving, and deleting files

 

%FREEKBYTESSOURCEBEFORE% The number of free kilobytes on the source/left before the profile started copying, moving, and deleting files. This is a whole (integer) number that is rounded up or down as appropriate.

 

%FREEMBYTESSOURCEBEFORE% The number of free megabytes on the source/left before the profile started copying, moving, and deleting files. This is a whole (integer) number that is rounded up or down as appropriate.

 

%FREEBYTESDESTBEFORE% The number of free bytes on the destination/right before the profile started copying, moving, and deleting files

 

%FREEKBYTESDESTBEFORE% The number of free kilobytes on the destination/right before the profile started copying, moving, and deleting files. This is a whole (integer) number that is rounded up or down as appropriate.

 

%FREEMBYTESDESTBEFORE% The number of free megabytes on the destination/right before the profile started copying, moving, and deleting files. This is a whole (integer) number that is rounded up or down as appropriate.

 

%SOURCESIZEBYTES% The total size (in bytes) of files that SyncBack has found in the source/left. This excludes filtered out files and other files not included based on the profile settings.

 

%DESTSIZEBYTES% The total size (in bytes) of files that SyncBack has found in the destination/right. This excludes filtered out files and other files not included based on the profile settings.

 

%HARDLINKCREATEDSRC% The number of hard links created in the source. This is when you have configured the profile to preserve hard links. This variable was introduced with V11.

 

%HARDLINKCREATEDDEST% The number of hard links created in the destination. This is when you have configured the profile to preserve hard links. This variable was introduced with V11.

 

%SYMLINKCREATEDSRC% The number of file symbolic links created in the source. This is when you have configured the profile to copy symbolic links. This variable was introduced with V11.

 

%SYMLINKCREATEDDEST% The number of file symbolic links created in the destination. This is when you have configured the profile to copy symbolic links. This variable was introduced with V11.

 

%COMPAREHARDLINKTOTAL% The number of hard links that have changed. This is when you have configured the profile to preserve hard links. This variable was introduced with V11.

 

%COMPARESYMLINKTOTAL% The number of symbolic links (including junction points) that have changed. This is when you have configured the profile to preserve hard links. This variable was introduced with V11.

 

%HTTPDOWNLOAD% The number of files downloaded using HTTP instead of FTP. This when you have configured HTTP Download with FTP. This variable was introduced with V11.

 

%STOREDEXTTOTAL% The number of files that were stored in the Zip file and not compressed due to their filename extension. This variable was introduced with V11.

 

%STOREDCOMPTOTAL% The number of files that were stored in the Zip file and not compressed because they were considered to already be compressed. This variable was introduced with V11.

 

 

Registry

 

As well as variables, you can also get values from the registry. For example, the following will retrieve the current version of Firefox that is installed:

 

%@HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\CurrentVersion%

 

To get values from the registry you must use %@ followed by one of the following (these define which part of the registry to read):

 

HKEY_CLASSES_ROOT

HKEY_CURRENT_USER

HKEY_LOCAL_MACHINE

HKEY_USERS

HKEY_PERFORMANCE_DATA

HKEY_CURRENT_CONFIG

HKEY_DYN_DATA

 

Then specify the path in the registry, e.g. \SOFTWARE\Mozilla\Mozilla Firefox\CurrentVersion, and finally finish with a single percentage sign (%). If there is no such value in the registry then the variable is not expanded.

 

If you are using a 64-bit version of Windows but a 32-bit version of SyncBackPro then it will read from the 32-bit registry by default. To read from the 64-bit registry you must use %64@, e.g.

 

%64@HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\CurrentVersion%

 

If you are a 32-bit version of Windows, and try to read from the 64-bit registry, then it will instead try to get the value from the 32-bit registry (because there is no 64-bit registry on 32-bit versions of Windows). Because of this it is recommend that you always use %64@ instead of %@ because it will work correctly on both 64-bit and 32-bit versions of Windows.

 

 

SyncBack Touch variables

 

When using a SyncBack Touch device you can use some special variables in the path (source or destination, depending on which is using SyncBack Touch). They can only be used in the path and nowhere else. These variables are expanded by SyncBack Touch on the remote device and not locally, so they are only expanded when the profile is run. All the variables start with SBT_ so it's clear to see if it's a SyncBack Touch variable.

 

You can also get the value of any environment variable that the remote SyncBack Touch process has access to. To do this simply prefix the remote environment variable with SBT_ENV_. For example, to get the PATH environment variable use %SBT_ENV_PATH%. Note that this functionality was introduced in SyncBack Touch V1.3.11 and later.

 

%SBT_VERSION% The version number of the SyncBack Touch software on the device, e.g. 1.0.0.0

 

%SBT_COMMON_MUSIC% The shared music folder on the device running SyncBack Touch. On Windows this is %CSIDL_COMMON_MUSIC% (see the Drives, Files, and Folders section above). On non-Windows operating systems it will be returned as appropriate.

 

%SBT_COMMON_PICTURES% The shared pictures folder on the device running SyncBack Touch. On Windows this is %CSIDL_COMMON_PICTURES% (see the Drives, Files, and Folders section above). On non-Windows operating systems it will be returned as appropriate.

 

%SBT_COMMON_VIDEO% The shared videos folder on the device running SyncBack Touch. On Windows this is %CSIDL_COMMON_VIDEO% (see the Drives, Files, and Folders section above). On non-Windows operating systems it will be returned as appropriate.

 

%SBT_COMMON_APPDATA% The shared downloads folder on the device running SyncBack Touch. On Windows this is %CSIDL_COMMON_APPDATA% (see the Drives, Files, and Folders section above). On non-Windows operating systems it will be returned as appropriate.

 

%SBT_MYMUSIC% The personal music folder of the user account running SyncBack Touch. On Windows this is %CSIDL_MYMUSIC% (see the Drives, Files, and Folders section above). On non-Windows operating systems it will be returned as appropriate.

 

%SBT_MYVIDEO% The personal video folder of the user account running SyncBack Touch. On Windows this is %CSIDL_MYVIDEO% (see the Drives, Files, and Folders section above). On non-Windows operating systems it will be returned as appropriate.

 

%SBT_MYPICTURES% The personal pictures folder of the user account running SyncBack Touch. On Windows this is %CSIDL_MYPICTURES% (see the Drives, Files, and Folders section above). On non-Windows operating systems it will be returned as appropriate.

 

%SBT_LOCAL_APPDATA% The personal downloads folder of the user account running SyncBack Touch. On Windows this is %CSIDL_LOCAL_APPDATA% (see the Drives, Files, and Folders section above). On non-Windows operating systems it will be returned as appropriate.

 

%SBT_DESKTOP% If the SyncBack Touch device is running on Windows then this is %CSIDL_DESKTOP%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_PROGRAMS% If the SyncBack Touch device is running on Windows then this is %CSIDL_PROGRAMS%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_PERSONAL% If the SyncBack Touch device is running on Windows then this is %CSIDL_PERSONAL%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_FAVORITES% If the SyncBack Touch device is running on Windows then this is %CSIDL_FAVORITES%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_STARTUP% If the SyncBack Touch device is running on Windows then this is %CSIDL_STARTUP%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_RECENT% If the SyncBack Touch device is running on Windows then this is %CSIDL_RECENT%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_SENDTO% If the SyncBack Touch device is running on Windows then this is %CSIDL_SENDTO%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_STARTMENU% If the SyncBack Touch device is running on Windows then this is %CSIDL_STARTMENU%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_DESKTOPDIRECTORY% If the SyncBack Touch device is running on Windows then this is %CSIDL_DESKTOPDIRECTORY%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_NETHOOD% If the SyncBack Touch device is running on Windows then this is %CSIDL_NETHOOD%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_FONTS% If the SyncBack Touch device is running on Windows then this is %CSIDL_FONTS%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_TEMPLATES% If the SyncBack Touch device is running on Windows then this is %CSIDL_TEMPLATES%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_COMMON_STARTMENU% If the SyncBack Touch device is running on Windows then this is %CSIDL_COMMON_STARTMENU%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_COMMON_PROGRAMS% If the SyncBack Touch device is running on Windows then this is %CSIDL_COMMON_PROGRAMS%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_COMMON_STARTUP% If the SyncBack Touch device is running on Windows then this is %CSIDL_COMMON_STARTUP%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_COMMON_DESKTOPDIRECTORY% If the SyncBack Touch device is running on Windows then this is %CSIDL_COMMON_DESKTOPDIRECTORY%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_APPDATA% If the SyncBack Touch device is running on Windows then this is %CSIDL_APPDATA%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_PRINTHOOD% If the SyncBack Touch device is running on Windows then this is %CSIDL_PRINTHOOD%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_ALTSTARTUP% If the SyncBack Touch device is running on Windows then this is %CSIDL_ALTSTARTUP%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_COMMON_ALTSTARTUP% If the SyncBack Touch device is running on Windows then this is %CSIDL_COMMON_ALTSTARTUP%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_COMMON_FAVORITES% If the SyncBack Touch device is running on Windows then this is %CSIDL_COMMON_FAVORITES%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_INTERNET_CACHE% If the SyncBack Touch device is running on Windows then this is %CSIDL_INTERNET_CACHE%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_COOKIES% If the SyncBack Touch device is running on Windows then this is %CSIDL_COOKIES%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_HISTORY% If the SyncBack Touch device is running on Windows then this is %CSIDL_HISTORY%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_PROFILE% If the SyncBack Touch device is running on Windows then this is %CSIDL_PROFILE%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_CDBURN_AREA% If the SyncBack Touch device is running on Windows then this is %CSIDL_CDBURN_AREA%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_WINDOWS% If the SyncBack Touch device is running on Windows then this is %CSIDL_WINDOWS%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_PROGRAM_FILES% If the SyncBack Touch device is running on Windows then this is %CSIDL_PROGRAM_FILES%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_PROGRAM_FILESX86% If the SyncBack Touch device is running on Windows then this is %CSIDL_PROGRAM_FILESX86%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_PROGRAM_FILES_COMMON% If the SyncBack Touch device is running on Windows then this is %CSIDL_PROGRAM_FILES_COMMON%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_PROGRAM_FILES_COMMONX86% If the SyncBack Touch device is running on Windows then this is %CSIDL_PROGRAM_FILES_COMMONX86%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_SYSTEM% If the SyncBack Touch device is running on Windows then this is %CSIDL_SYSTEM%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_SYSTEMX86% If the SyncBack Touch device is running on Windows then this is %CSIDL_SYSTEMX86%. See the Drives, Files, and Folders section above. For other device types, e.g. macOS, then this variable is invalid and will not be expanded.

 

%SBT_EXTSDCARD% If the SyncBack Touch device is running on Android then this is the path to the external SD card (if available).

 

The following variables are used with SyncBack Touch profiles but are evaluated by SyncBack itself and not on the SyncBack Touch device:

 

%SBTNAME% The name (or hostname or IP address, depending on what is set in the profile) of the SyncBack Touch device.

 

%SBTUSERNAME% The username used to connect to the SyncBack Touch device.

 

%BYTESSAVEDDELTAUPLOAD% When using delta-copy upload/download with SyncBack Touch, this is the total number of bytes that were saved by using delta-copy. Saved means in terms of bytes that were not sent over the network. You can use these variables to determine if it is worth using delta-copy with SyncBack Touch. Introduced in V10.

 

%KBYTESSAVEDDELTAUPLOAD% This is the KBytes representation of %BYTESSAVEDDELTAUPLOAD%.

 

%MBYTESSAVEDDELTAUPLOAD% This is the MBytes representation of %BYTESSAVEDDELTAUPLOAD%.

 

%BYTESSAVEDDELTADOWNLOAD% When using delta-copy upload/download with SyncBack Touch, this is the total number of bytes that were saved by using delta-copy. Saved means in terms of bytes that were not received over the network. You can use these variables to determine if it is worth using delta-copy with SyncBack Touch.. Introduced in V10.

 

%KBYTESSAVEDDELTADOWNLOAD% This is the KBytes representation of %BYTESSAVEDDELTADOWNLOAD%..

 

%MBYTESSAVEDDELTADOWNLOAD% This is the MBytes representation of %BYTESSAVEDDELTADOWNLOAD%..

 

 

Order of evaluation (precedence)

 

Variables are evaluated in the following order:

 

1.Registry variables

2.Windows environment variables

3.User defined (profile, group and global) variables, the %AUTOINC% variable and run-time variables, e.g. %PROFILENAME%

4.SyncBack variables

5.SyncBack Touch variables

 

Profile variables replace any existing group and global variables. Group variable replace any existing global variables. If a user defined profile variable has the same name as a user defined group variable, or a user defined global variable, then the profile variable replaces the group or global variable. If a user defined group variable has the same name as a user defined global variable, then the group variable replaces the global variable.

 

 

Important note about Variable usage

 

An important point to remember is that Windows has its own environment variables, e.g. %USERNAME%. When these variables are used in a batch file, or on the command line, then Windows automatically expands them. Unknown variables are simply deleted. For example, if you had the following batch file:

 

@echo off

"c:\program files\2brightsparks\SyncBackPro\SyncBackPro.exe" -source "x:\%DAY%\"

 

Then when run it would actually be expanded to do the following:

 

@echo off

"c:\program files\2brightsparks\SyncBackPro\SyncBackPro.exe" -source "x:\\"

 

Note that the %DAY% has been removed because it's an unknown Windows variable (it's a SyncBackPro variable). To stop Windows from changing SyncBackPro variables you must use two percentage signs, e.g.

 

@echo off

"c:\program files\2brightsparks\SyncBackPro\SyncBackPro.exe" -source "x:\%%DAY%%\"

 

 

 

All Content: 2BrightSparks Pte Ltd © 2003-2024