Folder Expansion Variables

You can enter variable macros as part of the folder names in Source, Destination, Versions Archive, or Deleted Archive folders. SmartBackup expands these variables to the corresponding values when it runs the backup project. There are three types of variables: Builtin variables, Windows Special Folders and Environment variables. Variable names must be enclosed in % signs (for example: %var%).

Tip Note:
All variables are case insensitive. You may type variables all in upper case "%SOURCE%", combined uppercase and lowercase "%Source%", or all in lowercase "%source%". Result will be the same.


Builtin Variables:

The following variables expand to their corresponding values when the Project is run.

Variable Name: Description:
Source Source folder full path *, ***
SourceTop Only last name of the Source folder path *, ***
SourceExcludeRoot

Only root part of the Source folder path (drive letter or UNC server root) *, ***

SourceRoot SourceRoot returns drive portion for the folder path specified in Source. **, ***
Destination Destination Folder full path *
DestinationTop Only last name of the Destination folder path *
DestinationExcludeRoot

Only root part of the Destination folder path (drive letter or UNC server root) *

DestinationRoot SourceRoot returns drive portion for the folder path specified in Destination. **
VersionsArchive File Versions Archive Folder full path *
DeletedArchive Deleted Files Archive Folder full path *
ComputerName Name of the computer SmartBackup is running on
UserName Name of the logged-in user
ProjectName Project Name *
ProjectId Project ID (20 letters code unical for each Project) *
      * Values entered in Project Properties.
      ** For local folders with drive letters, the result is in the form “<drive>”. For folders with a UNC path the result is in the form “\\<servername>\<sharename>”. If the given source path contains neither style of path prefix, the result is an empty string.
      *** If you have multiple Source folders in your Backup project - you can access specific folder by adding a number representing this folder order in list. For example: %Source1%, %SourceTop2%, %SourceRoot2% etc...

      Examples:
       If Source is "c:\Documents and Settings\Mike\" then in Destination you may type something like this: "g:\Backup\%SourceExcludeRoot%" expands to "g:\Backup\Documents and Settings\Mike\").
       If Source is "c:\Documents and Settings\Mike\" then in Destination you may type something like this: "g:\Backup\%SourceTop%" expands to "g:\Backup\Mike\").



DateTime Date and time as YYYYMMDDHHMMSS
Date Date as YYYYMMDD
Year Year as a 4 digit number
Month Month as a 2 digit number
Day Day as a 2 digit number
Time Time as HHMM
Hour Hour as a 2 digit number
Min Minutes as a 2 digit number
Sec Secundes as a 2 digit number
MonthOfYearStr Month as a short name (Jan, Feb, Mar, etc.)
MonthOfYearString Month as a full name (January, February, March, etc.)
WeekOfYear Week of the year number *
WeekOfMonth Week of the month number *
WeekDayStr Day of the week as a short name (Mon, Tue, Wed, etc.)
WeekDayString Day of the week as a full name (Monday, Tuesday, Wednesday, etc.)
WeekDayNum Day of the week number *
DayOfYear Number of days from December 31 of the previous year
DayOfWeek Day of the week number *
HourOfYear Number of hours from 12:00 AM of the first day of the year
HourOfWeek Number of hours from 12:00 AM of the first day of the week *
HourOfMonth Number of hours from 12:00 AM of the first day of the month
MinuteOfYear Number of minutes from 12:00 AM of the first day of the year
MinuteOfMonth Number of minutes from 12:00 AM of the first day of the month
MinuteOfWeek Number of minutes from 12:00 AM of the first day of the week *
MinuteOfDay Number of minutes from 12:00 AM of the same day
SecondOfYear Number of seconds from 12:00:00 AM on the first day of the year
SecondOfMonth Number of seconds from 12:00:00 AM on the first day of the month
SecondOfWeek Number of seconds from 12:00:00 AM of the first day of the week *
SecondOfDay Number of seconds from 12:00:00 AM of the same day
      * SmartBackup defines the week according to the ISO 8601 standard. That is, the week starts on Monday and ends on Sunday.

      Example:
       On December 31st 2002, a folder name "C:\Backup\%Date%" will expand to "C:\Backup\20021231".


Windows Special Folders:
The following variables expand to their corresponding values when the Project is run.

Variable Name: Description:
WindowsDesktop Desktop Folder *
WindowsInternet Internet Folder
WindowsPrograms Path to "Start -> Programs" menu *
WindowsControls WindowsControls
WindowsPrinters WindowsPrinters
WindowsPersonal Path to "My Documents" folder *
WindowsFavorites Path to "Favorites" folder *
WindowsStartup Path to "Start -> Programs -> Startup" menu *
WindowsRecent Path to "Recent" folder *
WindowsSendto Path to "Send To" folder *
WindowsBitbucket WindowsBitbucket
WindowsStartMenu Path to "Start" menu *
WindowsDesktopDirectory Path to "Desktop" folder *
WindowsDrives WindowsDrives
WindowsNetwork WindowsNetwork
WindowsNethood WindowsNetwork
WindowsFonts Path to Window's "Fonts" folder (usually "C:\WINDOWS\Fonts")
WindowsTemplates WindowsTemplates
WindowsCommonStartMenu WindowsCommonStartMenu
WindowsCommonPrograms WindowsCommonPrograms
WindowsCommonStartup WindowsCommonStartup
WindowsCommonDesktopDirectory WindowsCommonDesktopDirectory
WindowsAppData WindowsAppData
WindowsPrinthood WindowsPrinthood
WindowsAltStartup WindowsAltStartup
WindowsCommonAltStartup WindowsCommonAltStartup
WindowsCommonFavorites WindowsCommonFavorites
WindowsInternetCache WindowsInternetCache
WindowsCookies WindowsCookies
WindowsHistory WindowsHistory
* Different value for each Windows user

Environment Variables:

These variables expand to their corresponding values based on the Windows Environment variables.

%VAR% Value of the environment variable VAR.

Example:
       On a Windows NT/2000/XP system on a network, a folder name %USERPROFILE% may expand to C:\Documents and Settings\Administrator.

Tip Tip:
You can add your own variable or list current environment variables using Windows "SET" command. See Windows help for details.


See also:
      Command Line Options


Copyright (c) 1996-2002 Onlime Media. All rights reserved.