Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2009
    Posts
    31

    Default Multiple Criterias and Reports

    Hi there

    I have 2 questions which i'm trying to get my head around to fix.
    1. Multiple Criteria

    Is it possible to insert multiple criterias into the script file. I'm trying to do the following
    criteria size; modified
    When i run the script, i get fatal error saying unexpected argument for modified. If i select a single criteria, then it seems to work alright. The reason i want to insert multiple criterias is i have come across a scenario when using beyond compare where there 2 files called sample.xsl on 2 servers in the following path

    \\server1\share1\folder1\sample.xsl and
    \\server2\share1\folder1\sample.xsl

    If i modify one of the the attribute values in both files to different values and run beyond compare with criteria size, i get no mismatch although there is difference in the modified section and also the attribute values are different on both the files. Is there a possible workaround for this?. please advice

    1. Multiple Reports

    My second question is we have a daily scheduled task setup compare all prod servers using BC tool. the script file associated to this task does the following

    folder-report layout:side-by-side options:column-size,column-timestamp,column-crc,display-mismatches &
    output-to:C:\folder1\folder2\Reports\Dailyreport.txt

    Is it possible to add an additional html format report with the script which is more user-friendly i.e. readable version with options as filename, file size, file version(incase of a .dll),modified date all mismatches in this case?

    please advice

    regards

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,881

    Default

    Hello,

    For Beyond Compare 3, the criteria command has an "attrib:" section that can be used for enabling the comparison of the dos attributes.
    Code:
    criteria attrib:ashr size
    may be what you are looking for (remove a,s,h, or r if you do not want to compare that attribute; you probably do not need to compare 'a'. You can find detailed documentation in the Help file under the Scripting Reference section.

    The Folder Report command already supports output as an HTML file. Look at the Folder-Report command's documentation and the Common Report Argument section for detailed instructions. You probably want to use a command similar to:
    Code:
    folder-report layout:side-by-side options:column-size,column-timestamp,column-crc,display-mismatches &
    output-options:html-color &
    output-to:C:\folder1\folder2\Reports\Dailyreport.html
    Aaron P Scooter Software

  3. #3
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,881

    Default

    In addition, comparing only size can be an insufficient comparison, since files can change contents, but the size remain constant. I would recommend a binary, crc, or rules-based comparison instead if you want to compare the contents of the files.
    Aaron P Scooter Software

  4. #4
    Join Date
    Nov 2009
    Posts
    31

    Default

    Thanks for the reply Aaron. This helped me with another question which was in my mind. But going back to my original question can we supply 2 parameters in the criteria section i.e. a section of my script looks like follows:

    #Criterias for compare
    criteria size; modified

    #Compare using binary if not crc
    compare binary

    can we do this?.

    Sorry, Also what i meant by attribute value was say there was object3.js file and one the version of the .swf file being called in the object3.js file was version 1.2.0.345 and the size of the file was 382 KB. With just criteria set to size, if i changed the value of .swf file to 1.2.0.346 being called in the object3.js file, this will not change the file size to anything other than 382 KB. So i thought id i use criteria and compare as follows:

    #Criterias for compare
    criteria size; modified

    #Compare using binary if not crc
    compare binary and i got a fatal error in the script after criteria set to size.
    can u suggest a possible workaround for this as setting DOS attributes doesn;t seem to be the answer to this scenario

  5. #5
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,728

    Default

    It is possible to select multiple criteria for comparison, see the description of the "criteria" command in the BC3 help file Scripting Reference topic.

    Here's an example:
    criteria timestamp:2sec;IgnoreDST size

    This will compare modified dates with a 2 second tolerance, ignoring daylight savings time differences. It will also compare the size of files.

    If you want to compare the contents of all files, you can just use "criteria binary".

    The "compare" command operates selected files. In most cases I use the criteria command instead, compare is only useful if you want to compare a subset of your files.
    Chris K Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •