View Single Post
  #2  
Old 08-29-2018, 04:21 PM
ekoranyi ekoranyi is offline
VanDyke Technical Support
 
Join Date: Jan 2017
Posts: 654
Hi paul-,

It is possible to connect to a saved session using the Connect method. The Connect method takes a string parameter that specifies how a connection is to be made. The format of the string parameter matches the format of the command line arguments to SecureCRT.

The format for specifying a saved session is:
Code:
/S session_name
Starts SecureCRT and opens a connection A data path or circuit between two computers over a phone line, network cable, or other means. with session_name. If session_name includes any spaces, it must be enclosed with quotation marks, (e.g., "My Session").
This may look something like:
Code:
crt.session.Connect("/s folder/mysession")
Your use case of connecting to every session in a folder may be a bit more difficult. You would most likely need to recursively iterate over the folder and capture all the session names, then connect to each. Can you help me better understand your use case and why you would like your users to specify a folder and connect to each session by script? Would simply right clicking on a folder in the Session Manager and choosing Connect In Tabs be an option?
__________________
Thanks,
--Eric

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote