The Set Variable Action provides a means to set the value of a User Variable to a new value. The value can include other variables. To append to the existing variable, simply prefix the new value with %VARIABLENAME% where variablename is the name of the variable who's value you are setting.

Although Target Parameters can be changed, they must be changed from script - not via the Set Variable action.


Set Variable

The name of a FinalBuilder variable to set.

New Value

Use existing value

The New Value field is ignored and the modifier is applied to the existing variable value.

New Value

The new value for the variable. Check the Expand Expression box to expand variable and other references in the value.  If you want to apply a modifier to the existing value of the variable (eg. maybe you need to make sure the variable has a backslash on the end of it), then select Apply to Existing Value instead.


A modifier is a function that can be applied to the new value (after any variables have been replaced).

The available modifiers are :

  • Trim white space from both sides of string:
  • Trim white space from left side of string:
  • Trim white space from right side of string:
  • Include Trailing Backslash - adds a \ if not already there
  • Exclude Trailing Backslash - removes \ if it exists
  • Extract the Filename portion from a path/filename
  • Extract the path portion from a path/filename
  • Extract the drive letter portion from a path
  • Extract the extension from a filename
  • Convert a path to a DOS 8.3 short filename
  • Add single quotes to a string
  • Add double quotes to a string
  • Strip single and double quotes surrounding a string
  • Increment an integer value
  • Decrement an integer value
  • Convert string to lowercase
  • Convert string to UPPERCASE
  • Encrypt string using blowfish
  • Decrypt string using blowfish
  • Remove the file extension from a filename

Force Type

There are some instances, usually when using integer and boolean values in scripting code, that you need to force the variable as a certain type.  For example, if you are setting a variable to "100", then you might want this to be forced as an integer type, or maybe as a string type.  Use the Default for FinalBuilder to use it's best guess what the type should be.

  • No labels