VanDyke Software Forums

VanDyke Software Forums (
-   Scripting (
-   -   Log Switch Script Issue (

btobin 09-29-2013 05:19 PM

Log Switch Script Issue
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.

Sub Main
      If crt.Session.Logging Then
        crt.Session.Log False
      End If

crt.Session.Log True
      crt.Session.LogFileName = "directory\%S_%M%D%Y_%h%m%s_POST.log"

End Sub

rtb 09-30-2013 08:30 AM

Hi btobin,

Thanks for posting the problem you are seeing. I have received and responded to your email. I will post the resolution when we have reached one via email.

All times are GMT -6. The time now is 04:12 PM.