PDA

View Full Version : Filter out file types in folder compare?


daluu
06-Nov-2010, 10:25 PM
Is that supported? Or am I doing things incorrectly? It seems that I can filter out folders from a folder compare but file type filtering doesn't work, though the BC log file (enabled from script command) indicates script didn't complain, it just didn't take effect.

If it is not supported, consider this a wishlist request (if not in the list already).

This is part of my script output from the log file:

11/6/2010 8:12:03 PM >> # enable logging just in case for debugging
11/6/2010 8:12:03 PM >> log verbose append:"C:\ComparisonResults\BCLog.txt"
11/6/2010 8:12:03 PM >> # load folders to compare from 1st & 2nd cmd line arguments
11/6/2010 8:12:03 PM >> # left side = 1st arg, right side = 2nd arg
11/6/2010 8:12:03 PM >> load "\\172.18.18.48\c$\Program Files\Artisoft" "\\172.18.18.55\c$\Program Files\Artisoft"
11/6/2010 8:12:03 PM Load comparison: \\172.18.18.48\c$\Program Files\Artisoft <-> \\172.18.18.55\c$\Program Files\Artisoft
11/6/2010 8:12:03 PM >> # exclude certain file types from comparison
11/6/2010 8:12:03 PM >> filter "-*.log;-*.dat;-*.txt;-*.bak;-*.fmt;-*.dmp;-*.mdmp"
11/6/2010 8:12:03 PM >> # exclude certain folders from comparison
11/6/2010 8:12:03 PM >> filter "-Logs\"
11/6/2010 8:12:03 PM >> # define comparison criteria
11/6/2010 8:12:03 PM >> criteria version timestamp:2sec;IgnoreDST size binary timezone:ignore
11/6/2010 8:12:03 PM >> # expand folders to compare everything including subfolders
11/6/2010 8:12:03 PM >> expand all
11/6/2010 8:12:08 PM Unable to compare TVDBDev.dat: Cannot open file "\\172.18.18.48\c$\Program Files\Artisoft\Televantage Server\Data\TVDBDev.dat". The process cannot access the file because it is being used by another process
11/6/2010 8:12:09 PM Unable to compare TVLogDev.dat: Cannot open file "\\172.18.18.48\c$\Program Files\Artisoft\Televantage Server\Data\TVLogDev.dat". The process cannot access the file because it is being used by another process
11/6/2010 8:13:27 PM >> # do folder comparison report w/ specified config
11/6/2010 8:13:27 PM >> folder-report layout:side-by-side &
11/6/2010 8:13:27 PM >> options:column-version,column-size,column-timestamp,display-mismatches &
11/6/2010 8:13:27 PM >> title:"Arisoft Folder Report, L is Ref, R is Pkg/Img" output-to:"C:\ComparisonResults\ArtisoftFolderReport.html" output-options:html-color
11/6/2010 8:13:27 PM >> # report saved to file defined by 3rd cmd line argument
11/6/2010 8:13:27 PM >> # w/ report title defined by 4th cmd line argument
11/6/2010 8:13:27 PM >> # can also "output-to:clipboard" then paste into file, etc. via external scripts as alternative
11/6/2010 8:13:27 PM >> # optional (double) beep to notify of script completion for this single folder compare task
11/6/2010 8:13:27 PM >> beep
11/6/2010 8:13:27 PM >> beep
11/6/2010 8:13:27 PM Script completed in 1 minutes, 24 seconds


Also, I looked over the script command reference and the sample scripts section of the help file. From both areas, it doesn't make it very clear if there is any dependency between

criteria rules-based

and

filter [options/settings]

So did I have to use "criteria rules-based" with some kind of filter setting to filter out files in a folder compare?

Aaron
08-Nov-2010, 10:50 AM
Hello,

The filter command should work, but each time you set it, it will completely override it and not append. So you have:
filter "-*.log;-*.dat;-*.txt;-*.bak;-*.fmt;-*.dmp;-*.mdmp"
# exclude certain folders from comparison
filter "-Logs\"

So the 2nd filter is the only line used in this case. To combine them, you would simply put all commands on one line:
filter "-*.log;-*.dat;-*.txt;-*.bak;-*.fmt;-*.dmp;-*.mdmp;-Logs\"

The Rules-based compare is not needed to have a filter. A rules-based compare is a content comparison that determines "same" or "different" status for files based on the text inside, rather than the default of using size. When combined with timestamp, you have have a timestamp and rules-based, or timestamp and size comparison. A rules-based compare is much slower than a timestamp/size comparison, however, so you may want to use the default unless you know you need it.

Lastly, if you place your filter and criteria commands above your load command, your load will be a bit faster. The load will trigger currently set criteria on all visible files, so setting them first limits the amount and type of the comparison, instead of re-comparing when you set criteria after the load.


log verbose append:"C:\ComparisonResults\BCLog.txt"
filter "-*.log;-*.dat;-*.txt;-*.bak;-*.fmt;-*.dmp;-*.mdmp;-Logs\"
#criteria version timestamp:2sec;IgnoreDST size binary timezone:ignore
Load comparison: \\172.18.18.48\c$\Program Files\Artisoft <-> \\172.18.18.55\c$\Program Files\Artisoft
expand all
folder-report layout:side-by-side &
options:column-version,column-size,column-timestamp,display-mismatches &
title:"Arisoft Folder Report, L is Ref, R is Pkg/Img" output-to:"C:\ComparisonResults\ArtisoftFolderReport.html" output-options:html-color

daluu
08-Nov-2010, 12:21 PM
Ok, got it. Thanks.