#1
|
|||
|
|||
![]()
I have a question about log files and scripts.
I routinely capture my SecureCRT sessions using a log file name with variables, e.g. "%Y_%M_%D %S.log" I also have to occasionally run a script which captures a bunch of information in separate log files. This script fails when I run it because I already have a log file open. I am rewriting the script so that it checks for an existing capture and, if there is one, it saves the current capture file name and closes it: If crt.Session.Logging = True ThenThe original log file is restored at the end of the script: If bPreviousCapture = True ThenUnfortunately, crt.Session.LogFileName returns the capture file name with the variables already populated, so once the script is finished my capture file name is fixed instead of variable. Is there a way to save and restore the proper capture file name with the variables intact? |
#2
|
|||
|
|||
Hi bwoo,
Probably. I think you would just want to get at the data using SessionConfiguration object instead (before enabling logging). What version of SecureCRT are you using? The option associated with your log file info is Log Filename V2. See the info for GetOption() and SetOption() methods in the Help topic Scripting / Script Objects Reference / SessionConfiguration Object.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Tags |
capture , log file , script , variables |
Thread Tools | |
Display Modes | Rate This Thread |
|
|