Filename of Log File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vern
    Enthusiast
    • Sep 2005
    • 24

    Filename of Log File

    The following log filename works fine in a script, with the actual date and time included as part of the filename:
    log verbose append:E:\Backup\Log_E_%date%_%fn_time%_.txt

    I then used the same syntax in the main Beyond Compare program (Tools/Options/Log) to generate a new log file each day with a unique filename:
    "C:\Temp\Temp_BC3\BcLogTrace_%date%_.txt"

    Unfortunately the actual date does not appear in the filename, instead the log filename is simply
    BcLogTrace_%date%_.txt
    Can the actual date be part of the log filename and a unique new log file generated each day?
  • Aaron
    Team Scooter
    • Oct 2007
    • 16026

    #2
    Hello,

    Yes, I tested that line of script and that should work for generating a file like:
    Log_E_2014-01-17_10-54-08_.txt

    Which version of BC3 are you running?
    Aaron P Scooter Software

    Comment

    • AjitPandey
      Journeyman
      • Oct 2015
      • 12

      #3
      I too have the same issue as Vern. I am using BC v 3.3.5.

      I am passing parameter as follows: Bcompare.exe @"C:\Compare\SampleScript.txt" "C:\Compare\BaseFile.xlsx" "C:\Compare\NewFile.xlsx" "C:\Compare\Compare_Diff_XLS_%date%.html"

      Comment

      • AjitPandey
        Journeyman
        • Oct 2015
        • 12

        #4
        I did some more debugging and found the answer. Here's what I did:
        This is what I am passing from batch file: Bcompare.exe @"C:\Compare\SampleScript.txt" "C:\Compare\BaseFile.xlsx" "C:\Compare\NewFile.xlsx" "C:\Compare\Compare_Diff_XLS"

        and My Script has this:
        output-to:%3"_%date%""_%fn_time%"".html"

        and my output file is named as:
        Compare_Diff_XLS_2015-10-21_10-15-08.html

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 16026

          #5
          Thanks for the follow-up. The %date% and %fn_time& variables are internal to our script, so if the command line tries to read and resolve the text before passing it in that would prevent it from working.

          Also, all BC3.x updates are free for 3.x users. You can update to the 3.3.11 from our website or using the Help menu -> Check for Updates.
          Aaron P Scooter Software

          Comment

          Working...