Path macros
Overview
When defining the location of a folder on an endpoint computer, you can specify an absolute path or use a path macro which looks similar for the administrator of the Connect Management Console, but takes different actual values on the endpoint system.
Advanced configuration
Keep in mind that the following default path macros can be overwritten in the configuration file.
Windows, Resilio Agent Service running as Local Service
| Macro | Windows 7 + (as service) |
|---|---|
| %HOME% | C:\Windows\ServiceProfiles\LocalService\ |
| %DOWNLOADS% | C:\Users\Public\Documents\Resilio Connect Agent |
| %USERPROFILE% | C:\Windows\ServiceProfiles\LocalService |
| %FOLDERS_STORAGE% | Location determined by the folders_storage_path parameter value in the sync.conf file that has been used to connect the Agent to the Management Console. This macro is also resolved to the default folder location that the user chooses in the Agent UI settings. |
Windows, Resilio Agent Service running as Local System
| Macro | Windows 7+ (as service) |
|---|---|
| %HOME% | C:\Windows\system32\config\systemprofile\ |
| %DOWNLOADS% | C:\Users\Public\Documents\Resilio Connect Agent |
| %USERPROFILE% | C:\Users\ |
| %FOLDERS_STORAGE% | Location determined by the folders_storage_path parameter value in the sync.conf file that has been used to connect the Agent to the Management Console. This macro is also resolved to the default folder location that the user chooses in the Agent UI settings. |
Windows, Resilio Agent Service running as user
| Macro | Windows Vista 7+ |
|---|---|
| %HOME% | C:\Users\ |
| %DOWNLOADS% | C:\Users\Public\Documents\Resilio Connect Agent |
| %USERPROFILE% | C:\Users\ |
| %FOLDERS_STORAGE% | Location determined by the folders_storage_path parameter value in the sync.conf file that has been used to connect the Agent to the Management Console. This macro is also resolved to the default folder location that the user chooses in the Agent UI settings. |
POSIX, NAS
| Macro | %HOME% | %DOWNLOADS% | %USERPROFILE% | %FOLDERS_ STORAGE% |
|---|---|---|---|---|
| macOS | /Users/ |
/Users/ |
/Users/ |
* |
| Linux/packages | home/ |
/home/ |
/home/ |
* |
| Synology | /volume1/Resilio Agent | /volume1/Resilio Agent/Downloads | /volume1/Resilio Agent/Downloads | * |
| Western Digital | /shares/Public/Resilio Agent | /shares/Public/Resilio Agent/Downloads | /shares/Public/Resilio Agent | * |
Android
| Macro | Description |
|---|---|
| %HOME% | /storage/sdcard0 |
| %DOWNLOADS% | Configured in Agent for Android settings, usually /storage/sdcard0/Download |
| %USERPROFILE% | /data/data/com.resilio.connect.agent/files |
| %SDCARD% | / |
| %FOLDERS_STORAGE% | Location determined by the folders_storage_path parameter value in the sync.conf file that has been used to connect the Agent to the Management Console. |
%GETFILES%
Feature availability
Available in Resilio Active Everywhere 4.0 and newer.
Applicable to Distribution Jobs created using the Resilio API.
The %GETFILES% is a special macro that can be applied to the source Agent in the Distribution Jobs created using the API. In that case, the Distribution Job Run expects a list of files to be transferred delivered in a separate API request.
Note
The %GETFILES% macro cannot be selected when creating a Distribution Job in the Management Console.
To use the %GETFILES% path macro:
-
Create a Distribution Job using the API.
curl --location 'https://resilio-mc:8446/api/v2/jobs' \ --header 'Content-Type: application/json' \ --header 'Authorization: Token IDDQDIDKFA' \ --data '{ "name": "Distribution job with GETFILES macros", "description": "", "settings": { "priority": 5, "use_ram_optimization": true, "delete_synced_files_ttl": 30, "profile": {} }, "groups": [], "agents": [ { "id": 1, "path": { "macro": "%GETFILES%" }, "permission": "rw" }, { "id": 2, "path": { "macro": "%DOWNLOADS%", "win": "GETFILES example", "osx": "GETFILES example", "linux": "GETFILES example", "android": "GETFILES example" }, "permission": "ro" } ], "type": "distribution", "use_new_cipher": true, "scheduler": { "type": "manually" }, "notifications": [] }' -
Start a Job Run for the Distribution Job in question.
-
Add files to the Job Run using the Runs - Add files API:
curl --location --request PUT 'https://192.168.0.50:8446/api/v2/runs/21/files' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer R3E7VYL6VLH4O4ETURCN6HWCDYOJGA6JMFVC7EWFIX346CRAUYNA' \ --data '{ "files": [ { "src": "/home/vboxuser/Downloads/001.mkv", "dst": "dir/101.mkv" }, { "src": "/home/vboxuser/Downloads/002.mkv", "dst": "dir/102.mkv" } ], "commit": true }'Tip
You may send as many
Add filesrequests as you need, until you submit a request with thecommitparameter set totrue.

