Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2018
    Posts
    6

    Question Comparing folders with Command Line scripts

    I have been trying to write a script to compare 2 folders with some files and tell me if they are equal or false

    My folder structure is:

    Folder 1: Folders Folder 2: Folders
    Empty Folder Empty Folder
    FolderA FolderA
    File.txt File.txt
    FolderB FolderB
    SubFolder SubFolder
    File.txt File.txt


    My script is:
    ************************************************** ************************
    *load "%1" "%2" *
    *expand all *
    *select all *
    *compare binary *
    *folder-report layout:side-by-side options:"%4" output-to:"%3" *
    ************************************************** ************************

    And in CLI i write:
    ************************************************** ************************************************** *****************
    *Bcomp.exe "@C:\FolderScript.txt" "C:\Folder1" "C:\Folder2" "C:\FolderReport.txt" display-all /silent *
    ************************************************** ************************************************** *****************

    Situation 1- My files from folder 1 are equal to files from folder 2:
    When comparing these 2 folders with GUI i am able to get that they are equal (with = sign)
    When comparing these 2 folders with Script i am able to get that they are equal (with = sign)

    Situation 2- My files from folder 1 are different to files from folder 2:
    When comparing these 2 folders with GUI i am able to get that they are different (with <> sign)
    When comparing these 2 folders with Script i am not able to get that they are different (i get << betweent files)


    I am using the latest stable version 3.3.13 of Beyond Compare

    Conclusion, what am i missing in order to get the <> sign when comparing these 2 folders when those files are different?

    PS: i do want to get the report in a text file and not in a html file (where i get the correct results)

  2. #2
    Join Date
    Feb 2018
    Posts
    6

    Default

    The format got this part confusing

    Folder 1: Folders Folder 2: Folders
    Empty Folder Empty Folder
    FolderA FolderA
    File.txt File.txt
    FolderB FolderB
    SubFolder SubFolder
    File.txt File.txt

  3. #3
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    12,011

    Default

    Hello,

    In script, you are still comparing timestamp and size, and then selecting and scanning binary. This way, the file would still be Newer or Older along with the comparison difference. Instead, if you remove the select and compare commands, and set a criteria, then only binary criteria is used:

    criteria binary
    load "%1" "%2"
    expand all
    folder-report layout:side-by-side options:"%4" output-to:"%3"

    How does this work for you?
    Aaron P Scooter Software

  4. #4
    Join Date
    Feb 2018
    Posts
    6

    Thumbs up

    Quote Originally Posted by Aaron View Post
    How does this work for you?
    Hello, it did work great. Wasn't aware of that detail since i didnt need it for the Text or the binary comparison.

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
  •