Creating unified diff files completely from command line

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • senf
    New User
    • Jun 2010
    • 1

    Creating unified diff files completely from command line

    Hi,

    I am looking for a command line tool that would take two paths to text files as input and output a file in the unified diff format (On Windows).

    Can I use Beyond Compare do that?

    Thanks,

    Senf
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    Hello senf,

    Yes, this would be done with BC Script.

    For example, a BC Script call can use variables on the command line call: bcompare.exe @script.txt variable1 variable2 variable3
    You could call bcompare.exe @"c:\myscript.txt" "c:\file1.txt" "c:\file2.txt" "c:\output.txt"

    The script would then contain:
    Code:
    text-report layout:patch options:patch-unified output-to:%3 %1 %2
    You can generate the report using our graphical interface first, to see if it is the style you want, by opening a Text Compare session, loading your two files, then go to the Session menu -> Text Comparison Report.

    Our trial is fully featured and can be used to test this before purchase:
    http://www.scootersoftware.com/download.php
    Aaron P Scooter Software

    Comment

    Working...