View Full Version : Folder Report not returning differences
Tom Compton
25-Jan-2010, 02:37 PM
I'm using the script below to run a folder comparison report. The script produces a file but no results and if I run this manually I get one item. Also, I haven't be able to get UNC's to work with the script. Any insight would be appreciated.
# Turn logging on
log verbose "C:\temp\wsyslog.txt"
# Load the wsys session
load wsys_test
# Load the base folders
load "Y:\BusSysSupport\Applications\PAM\SP_Patches\XG8\2 0100124_Applied" "W:\pam\wsys"
load <default>
select left.newer.files left.orphan.files
# Creates report
folder-report layout:side-by-side options:display-left-newer-orphans,column-version output-to:"C:\Temp\Wsys_Compare.html" output-options:html-color
Aaron
25-Jan-2010, 03:14 PM
Hello,
Settings are stored per Windows user by default, so if the script is running as a different windows user, it will have a different or non-existent session loaded.
To switch to a single directory install, please backup your settings with the Tools menu -> Export. Then place a BC2.xml file (blank) and a BC2.key file (with your key in it) in the Beyond Compare 2 directory. Then launch and import your settings.
http://www.scootersoftware.com/support.php?zz=kb_removablemedia
You should be able to save your session with the location and settings, and not need the other two load commands.
Also, you do not need the select command for the folder-report, but you may need an expand all.
# Turn logging on
log verbose "C:\temp\wsyslog.txt"
# Load the wsys session
load wsys_test
expand all
# Creates report
folder-report layout:side-by-side options:display-left-newer-orphans,column-version output-to:"C:\Temp\Wsys_Compare.html" output-options:html-color
Tom Compton
25-Jan-2010, 03:44 PM
I followed the instructions but get an error trying to load the "session" info. The instructions say to use the Prefs.xml as your BC2.xml. Is that correct? Also, I've just placed the .xml file where my Beyond Compare is normally installed. Is that a problem?
Chris
25-Jan-2010, 04:32 PM
Renaming Prefs.xml to BC2.xml for single directory mode is correct, it should be located in the same folder as BC2.exe.
If single directory mode isn't working for you, it should work fine to use a single load command to specify the paths you want compared:
# Turn logging on
log verbose "C:\temp\wsyslog.txt"
criteria timestamp size
load "Y:\BusSysSupport\Applications\PAM\SP_Patches\XG8\2 0100124_Applied" "W:\pam\wsys"
expand all
# Creates report
folder-report layout:side-by-side options:display-left-newer-orphans,column-version output-to:"C:\Temp\Wsys_Compare.html" output-options:html-color
Also, Beyond Compare does support UNC paths. If you're having trouble using UNC paths, check for a typo in the UNC path in your script.
Aaron
28-Jan-2010, 09:40 AM
In addition to Chris' suggestions:
UNC paths are sometimes not bound correctly to the computer's name (\\computername\folder) at the time of the script call. This is an issue with particular network setups and would occur with My Computer as well.
If you are experiencing this issue regularly, switching to use the computer's IP address helps in these cases (\\ip\folder).
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.