Announcement

Collapse
No announcement yet.

How to compare two folders via command line and get result in cmd as well?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to compare two folders via command line and get result in cmd as well?

    Hello,

    I have two folders C:\fold1 and C:\fold1, and I am trying to run a comparison between them on all their directory tree and file contents.
    I need to get the result in my batch file and act according to it. (if there is a difference then do something, if there isn't then don't)

    I was looking thruogh the documentation of BC4 but couldn't find any example to help me.

    Can you assist?

    Thank you,
    David

  • #2
    Hello,

    Folder comparisons from the command line use BC4 in scripting mode. This mode does not directly return to the command line, but can generate a folder-report, which can be parsed by another, external script. Parsing the summary layout or xml would be useful.

    You can activate script with:
    bcompare.exe "@c:\bcscript.txt"

    where bcscript.txt would be something like:
    load "c:\fold1" "c:\fold2"
    expand all
    folder-report layout:xml output-to:"c:\reports\report.xml"
    Aaron P Scooter Software

    Comment

    Working...
    X