#1
|
||||
|
||||
![]()
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. Script examples for both Python and VBScript are included below. --Jake
__________________
Jake Devenport VanDyke Software Technical Support YouTube Channel: https://www.youtube.com/vandykesoftware Email: support@vandyke.com Web: https://www.vandyke.com/support |
![]() |
Tags |
config , example script , python , securecrt , vbscript |
Thread Tools | |
Display Modes | Rate This Thread |
|
|