No announcement yet.

Compare folders - Find all differences

  • Filter
  • Time
  • Show
Clear All
new posts

  • Compare folders - Find all differences

    I'm new to BC and am using both BC3 and BC4 on different PC's. I have written several scripts that all work fine, except for "one", the one that should be the simplest. What I aim to achieve is to simply compare two folders, if anything should be different within these two folders, files, orphaned folders or orphaned files, anything be it left or right, output these differences in a txt file.
    I have known differences in both folders but the only time BC flags a difference is in my "root" folder"

    My script
    load <default>
    load "C:\Users\Public\Programs\AEVM" "C:\Users\Public\Programs\Equator"
    folder-report layout:summary options:display-mismatches output-to:"C:\ProgramData\AEVM-Backup\Log\AEVM-Synclog %date% %fn_time%.txt"
    folder-report layout:summary options:display-mismatches output-to:"C:\ProgramData\AEVM-Backup\Log\VerifytoAEVM.txt

    My output
    Folder Compare
    Produced: 4/26/2019 9:59:22 AM

    Mode: Differences
    Left base folder: C:\Users\Public\Programs\AEVM
    Right base folder: C:\Users\Public\Programs\Equator

    Left Orphan Files (0) Size Modified

    Right Orphan Files (0) Size Modified

    Left Newer Files (0) Size Modified

    Right Newer Files (0) Size Modified

    Differences Files (0) Size Modified

    Unscanned Folders

  • #2

    In your script, add an "expand all" between the load and the folder report lines.

    Script commands mirror the same actions you take in the graphical interface. By default, in the interface, if you load a folder compare and immediately generate a report, the folders would still be in a collapsed state. So in both the interface and scripting, you would either need to configure the session to auto-expand folders or issue a quick Expand All command to open all subfolders before generating a report.

    Does this get this up and running for you?
    Aaron P Scooter Software


    • #3
      Thank you, Aaron. This helped me figure out my problem.
      I am using visual studio and have an automated tool that an operator can select how he wants BC to run via button. I then write the script file based on his choices. I had expand all in my code originally, but it did not work at first. This was due to me forgetting to include a vbcrlf after Expand all which then was adding it to my line "folder-report layout".