View Single Post
Old 09-09-2016, 07:36 AM
bgagnon bgagnon is offline
VanDyke Technical Support
Join Date: Oct 2008
Posts: 3,938
Hi SunJustWorks,

Sorry, for the misunderstanding, I should have explained further. The existing template variables are not really documented because they work behind the scenes. But it's probably not a bad idea to have the info out there so below is a comprehensive explanation of the current functionality.

Note that this functionality has only existed since SecureCRT version 7.2.x.

SecureCRT does not currently maintain separate platform-specific values for the same configuration setting.

However, since version 7.2.x, SecureCRT supports cross-platform "substitutions" for well-known paths. In other words, if any path stored in a field within a SecureCRT global or session configuration begins with a well-known path, the value is saved to the INI file(s) in substitution form, not in literal form. This means that if you carefully choose to have your log files stored in a folder that descends from one of these well-known locations, it will be cross-platform compatible.

Here's a list of the "well-known" paths that are saved in substitution format automatically by SecureCRT when the value is written to the INI file (and converted to the actual path on the system when the value is read from the INI file):
    SecureCRT's config folder path (as defined in Global Options / Configuration Paths category)
    If SecureCRT's configuration path is set to C:\Users\user\AppData\VanDyke\Config, any file-related setting that contains this path will result in the path being substituted with ${VDS_CONFIG_PATH} when saved to the INI file.
    Example: Log file in GUI on Windows is set to C:\Users\user\AppData\VanDyke\Config\Logs\%S\%Y%M%D_%h%m%s_%t_Log.txt
    When written to the .ini file, the above becomes:

    This means that if a user loads this session config on a Mac OS X machine where their configuration folder is set to: /Users/User/Library/Application Support/VanDyke/SecureCRT/Config ...When read in from the INI file, the ${VDS_CONFIG_PATH} is automatically converted to the /Users/User/Lib.../Config path

    And therefore, the log files would be saved to /Users/User/Lib.../Config/Logs
    The location where the SecureCRT application binary itself lives (e.g. where SecureCRT.exe is found, on Windows).

    The location to the user's My Documents or Documents folder on Mac/Windows platforms. On Linux platforms this resolves to the user's home folder.

    In this and other cases, you can combine a substitution with relativism (e.g. ${VDS_USER_DATA_PATH}\..\..\folderB\etc\)

    The location of user-specific SSH data (on Windows, this is My Documents; on Mac/Linux, it's the user's .ssh directory)

NOTE: All of the above are handled automatically for you; when you look in the SecureCRT user interface at a field where any component of a path represents the above locations, you'll actually see the *resolved* location -- not the substitution -- whereas if you look inside the INI file of the session configuration, you'll see the substitutions listed above rather than the actual paths.

VanDyke Software
Technical Support
(505) 332-5730

Last edited by jdev; 08-28-2018 at 05:16 PM.
Reply With Quote