Questions and issues with File-report comaprison

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dinesh1393
    Enthusiast
    • Jan 2018
    • 23

    Questions and issues with File-report comaprison

    Hi,

    Could you please help me how to create a script for comparing two files and generating a report in Binary format.
    i,e: If both files are same it should give output like 'file1.txt = file2.txt' or 'file1.txt <> file2.txt'.
    Also, the input parameters will contain file names only not folder.

    I tried the below script but its giving the difference of the file content. I want only the file names with equal or not equal signs. Is there any possibility to create a script to get the output like this.

    file-report layout:side-by-side &
    options:ignore-unimportant,display-context &
    output-to:"‪D:\New folder\report.txt" output-options:html-color "‪D:\New folder\file1.txt" "‪D:\New folder\file2.txt"

    Thanks in advance,
    Dinesh Kumar
  • Aaron
    Team Scooter
    • Oct 2007
    • 16002

    #2
    Hello,

    No, not directly. You can generate a Folder report with a list of files, and that would be a list of file names. The File report generates a report of the file content given two files. If you pick the layout:statistics type contains numerical values for each criteria, so you could parse this to find if the files are equal or different.

    Alternatively, you can use:
    bcomp.com /qc "d:\file1" "d:\file2"
    and
    echo %ErrorLevel%

    which returns a code for if the files are equal or different, but not text. The code list is documented in our Help menu -> Contents (F1), Command Line Reference chapter.
    Aaron P Scooter Software

    Comment

    Working...