1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? Save the session log from a batch file?

Discussion in 'Support' started by mathewsdw, Jun 4, 2012.

  1. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    By "session log", I specifically mean the results of the Take Command "Save to file..." menu option. There doesn't seem to be any way that I can find to do that from a batch file. Am I right about that?
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,938
    Likes Received:
    30
    SAVECSB (4CONSOLE plugin) will save the console screen buffer as plain text. I just gave it a quick test from TCMD and it seemed to work OK. Sample:
    Code:
    Begin saved console screen buffer: 2012-06-04  11:51:37
    -------------------------------------------------------
     
     
    v:\> savecsb /?
    Save the contents of the console screen buffer to a file
     
      SAVECSB [/A] file
     
        File is created if not found
        /A : append to file (else write new file)
     
    -----------------------------------------------------
    End saved console screen buffer: 2012-06-04  11:51:37
     
    ********************************************************************************
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,938
    Likes Received:
    30
    4CONSOLE also has SAVECON/RSTRCON which will save (in a binary format) / restore the console's text, attributes, and metrics. One quick and simple test worked OK in TCMD. It was not meant for TCMD, however, and uses CONSIZE to restore the console to the saved state. I don't know how well RSTRCON will work if you monkey around with the sizes of the consoles underlying TCMD's tabs.
     
  4. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Thank you, Vince! Now everything's perfect!
     
  5. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Actually, Vince, not quite. While this had an easy work-around for me, it doesn't seem that the "/A" flag is doing anything (although it's certainly a possibility that I screwed up somewhere). Since, again, it wasn't a problem for me, I'm telling you as a pure FYI.
     
  6. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Vince, cancel that. Stupid mistake, as I'm so fond of making, on my part.
     

Share This Page