Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2018
    Posts
    1

    Question 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. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,908

    Default

    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

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
  •