No announcement yet.

Multiple Compares at once ?

  • Filter
  • Time
  • Show
Clear All
new posts

  • #16

    Scripting mirrors steps you can take in the graphical interface, each step performed top to bottom.

    So the original script is:
    loading a pair of folders
    expand all folders to see all sub items
    selecting nothing
    performing the right-click -> Compare Contents command on no selection, so nothing is scanned.

    By adding the select all in the newest script, you are selecting everything, right clicking and running the binary scan on that selection, which should take much longer.

    Without setting a criteria before the load, the default criteria is used (timestamp and size comparison). This timestamp/size scan uses the file properties and metadata without opening and scanning the content inside of a file, which makes it a much faster scan to perform. If the file's recorded timestamp and size information matches, then the files are marked as the same. Often, this level of accuracy is fine, but if you want to know if the files are exact copies of each other then a binary scan would be needed.

    In my earlier example, setting criteria first sets a new comparison to use on load, a background criteria used (binary), then loads a pair of folders into this environment. The load itself then triggers the binary scan. This is like if you had an empty Folder Compare in the graphical interface, then updated the Session Settings to perform a binary scan on everything, and then picked and loaded folders into this customized Folder Compare session. Setting criteria first is slightly faster since it loads only once with a specific criteria. Otherwise the first load of timestamp/size has to finish, and then the binary compare is run additionally after that, instead of a single scan at the same time during the load.
    Aaron P Scooter Software


    • #17
      Ok, now I understand. My script was working because it defaults to checking the date/time stamp and size comparison.

      I think that will suffice for what I need.

      I'll run with that and if it ever bites me, I'll go back to binary

      To clarify one thing to make sure I got it...

      You say, in my script, I can remove the compare command because it's acting on nothing, yet when tested it did find missing or added files. If I understand what you are saying, this is working because, since there is no criteria command, it is defaulting to date/file size compare and the mere loading of the two folders is initiating that compare.

      Last edited by BCLarry; 28-Apr-2017, 04:53 PM.


      • #18
        Yes, without a defined "criteria", it uses the default. To better see this behavior in action: load the graphical interface and start a blank folder compare session. This session also defaults to timestamp/size, and then select and load two base folders. Note the coloring and comparison status assigned to files? This is the same type of scan that your script would run by "load"ing a pair of folders, too.
        Aaron P Scooter Software


        • #19
          Got it. Thanks !

          It would be cool if you could use the interface and set up a compare exactly the way you want it, then save it as a script


          • #20

            We do support saving a Folder Compare session, then using the load command to load that session name (which brings in any folder pairs or session settings)? This extends to a blank folder compare of just settings, and then loading folders into it:

            log verbose "c:\bclog.txt"
            load "session with settings but no folders Name"
            load "c:\folder1" "c:\folder2"
            expand all
            Aaron P Scooter Software


            • #21
              Excellent. Thanks !