Start a new topic

Variables in Dynamic Folder Script


I'm trying to create a Dynamic Folder Script for all members of my team.

In a shared Document, I can use $EffectiveUsername$ for example.

In a Dynamic Folder Script, when I write $EffectiveUsername$, when I'm reload, the value is empty.

is it normal ?

I have the impression that all the variables are replaced by nothing

Royal TS v6.1.60731

Best Regards,


If I understand your requirement correctly, you can use $EffectiveUsername$ (and password) in the script/json but you need to make sure you configure the credential on the dynamic folder and also make sure you specify credential from parent on each connection/level. Can you try that and see if it resolves the issue?

We use CyberArk and not RoyalServer TS  :) 

So, the computerName must be : vaultuser@targetuser#domainaddress@targetmachine#targetport@targetpassword@proxyaddress

The Dynamic Folder will be shared between my team members.

1st : Each member have a personnal account ($EffectiveUsername$)

2nd : It's more easy to modify a json file and replace any value than a modifcation in standard objects when you must update many objects.

Best Regards,


I guess I don't understand the use case. Since you are creating these dynamic (volatile) objects using the dynamic folder script, why not just set the computer name as it should be for each object? What do you gain by using replacement tokens?

Hi Stefan,

No :)

This is my connections :


"Objects": [
        "Type": "TerminalConnection",
        "TerminalConnectionType": "SSH",
        "Name": "[username] - PostGre - host (ssh)",
        "ComputerName": "$EffectiveUsername$@$CustomField1$''$CustomField2$''$CustomField3$@host.l@gateway",
        "CredentialID": "000001",
        "Properties": {
            "KeepAliveInterval": "60",
            "SOKeepAliveOption": "true",
            "PuttyLogFileFlushFrequently": "true",
            "PuttyLogging": "1",
            "RecordCreateSubDir": "true",
            "RecorderOutputPath": "C://Local//Logs",
            "RecordStartOnConnect": "true",
            "CustomField1FromParent": true,
            "CustomField2FromParent": true,
            "CustomField3FromParent": true

In a standard Folder, all variables in the field ComputerName was replaced by their values.

In a Dynamic Folder, all varaibles are empty. 

However, the values are well initialized, I can see them through the different panels.

Best Regards,


Hi Yann,

replacement tokens in dynamic folder scripts are replaced when executing the script based on the settings of the dynamic folder. This way you can securely inject authentication information to the script without putting the clear text password(s) into the script.

Since you are running a script which dynamically populates all properties, you can simply fill in the correct credential information (or use a dynamic credential).

I hope this clears things up. Should you have any further questions, let me know.


Login or Signup to post a comment