In your scripts, do you ever need to derive the configuration folder location where SecureCRT is loading/saving config data? These examples (Python and VBScript) show you how you can accomplish this in SecureCRT 7.2 and newer versions.
This technique leverages the cross-platform support that was introduced in SecureCRT version 7.2, providing a map between substitution variables and actual file system path locations. One such substitution is ${VDS_CONFIG_PATH}, which maps to the actual configuration folder in use by SecureCRT.
In this technique, our script code executes the following steps in order:
So... which session is it that the script is manipulating in order to stash/set/read/restore the Upload Directory V2 option?
It so happens that it's the session that's active when the script is launched. If you don't have any active connections (SecureCRT has just been launched, and you don't have any tabs/tiles open to any hosts yet) or if you've been using ad hoc connections then it's the default session that is being manipulated. Watch the Default session YouTube video to learn more.
GetConfigPath.py.txt (1.5 KB)
GetConfigPath.vbs.txt (1.6 KB)
VanDyke Software uses cookies to give you the best online experience. Before continuing to use this site, please confirm that you agree to our use of cookies. Please see our Cookie Usage for details.
Here you can control cookies using the checkboxes below. Some cookies are essential for the use of our website and cannot be disabled. Others provide a convenience to the user and, if disabled, may reduce the ease of use of our site. Finally, some cookies provide anonymous analytic tracking data that help us provide the user with a richer browsing experience. You can elect to disable these cookies as well.