Environment variables

Environment Variables

GS RichCopy 360 (Standard and Enterprise) support environment variables in the GUI and the command line interface (CLI). Environment variables support is not limited to paths only; it is fully supported in the following areas:

  • Source and Destination

  • Log location

  • Folder and File (Inclusion/Exclusion) filters

  • Mail fields (from, to, CC, and BCC)

  • Destination path and Sync Poisoning path on RTA server (Enterprise only)

All Windows environment variables can be used to include system and user-defined variables. They can be inserted like these: %VARIABLE% or ^VARIABLE^

Note: It is recommended to use the ^VARIABLE^ format if using the CLI.

To find out about the environment variables defined in a Windows system, open the Command Prompt window, and then enter SET.

The following are some popular environment variables:

  • %USERNAME%—current Windows username.

  • %USERPROFILE%—current user profile directory.

  • %COMPUTERNAME%—the Windows name of this computer.

GS RichCopy 360 also provides another set of variables that can be used in creating dynamic archives for yearly, monthly, weekly, and daily backups or based on date:

VARIABLE DESCRIPTION
%GSRICH% App Startup path
%YYYY% YEAR 4 Digit 2016
%YY% YEAR 2 Digit 16
%MM% MONTH 2 DIGIT 02 (case-sensitive)
%MMM% MONTH Feb
%MMMM% MONTH February
%DD% Day 26
%DDD% Day Fri
%DDDD% Day Friday
%DOW% Day of Week 5
%hh% Hour 05 in 12 hour format (case-sensitive)
%HH% Hour 17 in 24 hour format (case-sensitive)
%mm% Minute (case-sensitive)
%SS% Seconds
%TT% AM/PM
%MS% Milliseconds
%WOM% Week of Month

Here is a good example of using GS RichCopy 360 special variables:

GS RichCopy 360 screenshot

Assuming the job above is scheduled to run only on weekdays, it would create this folder structure in the destination folder.

Note: DC4 is the name of the computer used in this example.

GS RichCopy 360 screenshot

GS RichCopy 360 screenshot Another good example of using environment variables is in the To, CC, and BCC fields in an email. Variables can be appended to an email address or act as a full email address if desired. In the image below, %StoreNumber% would be an environment variable that is pre-defined by the system administrator. If the value for instance was 12, the email would have been sent to [email protected]. Similarly, if the %headquarters% is translated to a value of [email protected], an email is sent to this address. For more information, refer to the following image: