I having an issue with a script I am trying to build. This script changes the name of the log file while logged in to a device. This part is successful. The problem is when I disconnect. When I reconnect or close out of SecureCRT and connect again the log file keeps the “_POST.log” in the name and in the Global and Session Options. By default, the Global and Session Options, it should be “directory\%S_%M%D%Y_%h%m%s.log”. How can I switch it back to the default when exiting a session or restarting SecureCRT?
#$language = "VBScript"
#$interface = "1.0"
crt.Screen.Synchronous = True
' This automatically generated script may need to be
' edited in order to work correctly.
If crt.Session.Logging Then
crt.Session.LogFileName = "directory\%S_%M%D%Y_%h%m%s_POST.log"