Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2018
    Location
    Phoenix
    Posts
    3

    Default Moving to BC4 from BC2 Question on comparison

    We currently have a VB6 application utilizing BC2 to compare files in folders across 2 disks (master and clients)

    The application no longer works with the move to Windows 10. Not sure if the VB6 version no longer works because BC2 does not work with Windows 10. I've rewritten the host application to be a .NET WinForm application using FW 4.6. I have also down loaded the 30 day trial copy of BC4.

    The goal is to utilize a script file (also generated dynamically in same .NET app) to perform the comparisons of two files and generate an output report (.txt) silently. I.E. I do not want to start a view or see a BC window. This is how it worked under the VB6 version.

    How do I accomplish this?
    I have:
    1. written a simple script to compare two files and output to a txt file
    2. in a command line session ran the following command to use BC4: bCompare. exe "MytestScript.txt"

    And I still get a sesion window/view. In the .NET applciation I will simply open a Shell / Process session and execute the BCompare.exe command.

    My script file contains:
    file-report layout:side-by-side options:display-mismatchs output-to:"C:\Temp\myreport" "I:\New Text Document" "I:\New Text Document (3).txt"

    Can I use BC2? Will it work on Win10
    We also have a lic for BC3.

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    BC2 is not supported on Windows 10, but does run. You could also use BC3 or BC4. BC4 is the current version with the most fixes and features. I would suggest testing from the Windows command line first running a set sample script manually to test platform compatibility before implementing into your .NET solution.

    For an automated solution, I would recommend using a Portable Install (C:\Tools\Beyond Compare 4\ as a single directory install) so that any user (graphical or automated) shares the same settings.

    The script itself looks good, as the syntax is mostly the same (although you can now execute different reports for different filetypes, so text files use the text-report, picture files use picture-report, and file-report auto-picks which depending on the files).
    To launch a script, like BC2, you need "@"
    bcompare.exe "@c:\bcscripts\bcscript.txt"

    We still host all major versions on our Download page, so you can download and try BC2, BC3, or BC4 for testing/registering, on the left side menu:
    http://www.scootersoftware.com/download.php
    Aaron P Scooter Software

  3. #3
    Join Date
    Aug 2018
    Location
    Phoenix
    Posts
    3

    Arrow

    I am still not able to get a successful compare of two files. I've tried several combinations of the script file and one variation of the commnad line. First the commnad line:
    bcompare.exe "@c:\temp\MyScript.txt"
    Throws an exception:
    A Fatal error has occured:
    Unexpected argument(s) "title:EngDiskBCReport
    The script will now exit.

    If I exclude the @ sign I do not get the same error. But the view does appear and I get a different error:
    8/13/2018 8:15:52 AM *** Beyond Compare 4 Evaluation -- 28 days remaining ***
    8/13/2018 8:15:52 AM >> file-report title:"EngDiskBCReport" layout:side-by-side output-to:"c:\temp\myBCReport.txt" options:display-all "C:\temp\Test1.txt" "C:\temp\Test2.txt"
    8/13/2018 8:15:52 AM Fatal Scripting Error: Unexpected argument(s) "title:EngDiskBCReport"


    And here is my script file. Again I've tried several combinations and I believe this is the most stripped down version:
    file-report title:"EngDiskBCReport" layout:side-by-side output-to:"c:\temp\myBCReport.txt" options:display-all "C:\temp\Test1.txt" "C:\temp\Test2.txt"
    8/13/2018 8:18:16 AM Script completed in 2 minutes, 24 seconds


    So what am I doing wrong?

    Bill

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,684

    Default

    The argument order for file-report needs to be changed to match the scripting reference for Beyond Compare 4.

    Try this:

    file-report layout:side-by-side options:display-all title:"EngDiskBCReport" output-to:"c:\work\myBCReport.txt" "C:\work\Test1.txt" "C:\work\Test2.txt"
    Chris K Scooter Software

  5. #5
    Join Date
    Aug 2018
    Location
    Phoenix
    Posts
    3

    Default Moving to BC4 from BC2 Question on comparison

    Quote Originally Posted by Chris View Post
    The argument order for file-report needs to be changed to match the scripting reference for Beyond Compare 4.

    Try this:

    file-report layout:side-by-side options:display-all title:"EngDiskBCReport" output-to:"c:\work\myBCReport.txt" "C:\work\Test1.txt" "C:\work\Test2.txt"
    Chris that worked, thank you!!!

    But I still got a view. In code I am going to shell out or open a process thread to execute a command line. Trying to avoid the user ever seeing a BC view. Could this be because I am on a trial license?

    -

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    2,519

    Default

    You can use the /silent command line switch to tell BC to suppress the scripting dialog along with any other user interaction. If you do that in trial mode I believe it just logs the number of days remaining in the trial rather than showing the nag dialog too.
    ZoŽ 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
  •