Environment Variables in Paths

GoodSync supports Windows environment variables and its own date and time variables in folder paths. This lets one job adjust its folder path automatically for the current Windows user, the computer name, the current date or time, or the drive GoodSync is running from.

NOTE: Variables must be typed manually into the folder path. They cannot be selected with the Browse dialog.

Common Windows Environment Variables

Variable Replaced with Example path
%GSDISK% The disk GoodSync.exe was started from. Use it for folders on a GoodSync2Go drive. %GSDISK%\Backups
%USERNAME% The current Windows user name. C:\Users\%USERNAME%\Documents
%USERPROFILE% The current user's profile folder, for example C:\Users\Jane. %USERPROFILE%\Documents
%COMPUTERNAME% The Windows name of this computer. D:\Backups\%COMPUTERNAME%

%USERPROFILE% is usually the better choice for personal folders, because it still works when a profile folder is not under C:\Users or does not match the user name.

GoodSync Date and Time Variables

GoodSync also supports its own date and time variables. They are useful for backup folders that are named by date or time.

Variable Replaced with Values
%YYYY% Current year For example, 2026
%MM% Current month 01 to 12
%DD% Current day of the month 01 to 31
%DOW% Current day of the week 0 to 6
%WOM% Current week of the month 1 to 4
%HH% Current hour (24-hour clock) 00 to 23
%II% Current minute 00 to 59

NOTE: The minute variable is %II%, not %MM%. %MM% is the month.

Example Paths

The example results below assume a computer named Office-PC, a Windows user named Jane, and a job that runs on June 24, 2026 at 14:05.

Goal Folder path Example result
A dated backup folder for each computer D:\Backups\%COMPUTERNAME%\%YYYY%-%MM%-%DD% D:\Backups\Office-PC\2026-06-24
One job that backs up each user's Documents %USERPROFILE%\Documents C:\Users\Jane\Documents
A shared backup drive with one folder per computer and user \\NAS\Backups\%COMPUTERNAME%\%USERNAME% \\NAS\Backups\Office-PC\Jane
One backup folder per month D:\Backups\%YYYY%\%MM% D:\Backups\2026\06
A folder for each backup run, named by date and time D:\Backups\%YYYY%-%MM%-%DD%_%HH%-%II% D:\Backups\2026-06-24_14-05
Seven daily folders that are reused each week D:\Backups\Day-%DOW% D:\Backups\Day-3
Four weekly folders that are reused each month D:\Backups\Week-%WOM% D:\Backups\Week-4
A folder on the GoodSync2Go drive, whatever its drive letter %GSDISK%\Backups\%COMPUTERNAME% E:\Backups\Office-PC

How to Add a Variable to a Folder Path

  1. Open the job, then click the folder path on the Left or Right side.
  2. Click in the path field and type the path with the variable, for example D:\Backups\%COMPUTERNAME%.
  3. Press Enter or click OK to save the path.
  4. Run Analyze to check that the path resolves to the folder you expect.

Tips

  • Type each variable exactly. Every variable needs a % sign on both sides. For example, %COMPUTERNAME\% will not work; type %COMPUTERNAME%\ instead.
  • Date and time folders start empty. A path that includes %DD%, %HH%, or %II% points to a new folder each day, hour, or minute. Each new folder gets a full copy of the files, so check that there is enough disk space.
  • Reused folders are overwritten. Paths built with %DOW% or %WOM% point to the same folder again a week or a month later, so they keep a fixed number of recent backups.
  • Use the right variable for each side. Use %USERNAME% or %USERPROFILE% for the source side of a job that runs on many computers, and %COMPUTERNAME% on the destination side to keep each computer's backups separate.

Return to top