Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2016

    Default Text Compare Scripting

    I have two text files that I want to do a text compare and add the new lines from one file to the other. Can I script this?

    One file will have a line added to it each day and I want to add that line to a master list with a scripted scheduled task.

    This only seems to work for folders, not files.

    # Dat_Script.txt
    # Copy Fld724 HTL to fld426 I:Component DBS010
    # "C:\Program Files (x86)\Beyond Compare 3\BCompare.exe"
    # "@C:\Temp\Dat_Script.txt"

    # Turn logging on
    log verbose append:"C:\Temp\%date%_Dat_Script_log.txt"

    # Override Prompt
    option confirm:yes-to-all

    load "C:\Temp\New Text Document.txt" "C:\Temp\New Text Document (2).txt"
    expand all
    sync create-empty update:left->right

  2. #2
    Join Date
    Oct 2007
    Madison, WI



    Scripting does not support copying specific text lines into a file. The sync commands work on a folder level, so the New version of the file can overwrite the entire Old version, if that is ok. Otherwise, Scripting on the file level only supports generating a comparison report (text-report command, which can accept file names as parameters without loading entire folders).

    text-report layout:side-by-side output-to:"c:\temp\bcreport.html" output-options:html-color "c:\file1.txt" "c:\file2.txt"
    Aaron P Scooter Software

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts