Hi there
I have the following problem which i have elaborated as much as possible.
I have a batch file which performs the sync process between 2 servers. One of the steps in the batch file is to call beyond compare application and perform compare between 2 folders, backup mismatches and sync up the mismatches. The following step is what i have written above extracted from my main batch file
rem Compare the Sakiv directory between the 2 servers
Echo Step5 = Comparing Sakiv Folder between %1 and %2. Any Difference in File on %1 will be backedup before syncing with %2...........
Call C:\Sync\Compare\CompareSakivFolder.bat
The contents of CompareSakivFolder.bat file is as follows
--------------------------------------------------------------------------
call C:\Sync\Compare\BCSakiv.bat "%1\c$\sakiv" "%2\c$\sakiv"
--------------------------------------------------------------------------
The contents of BCSakiv.bat file is as follows
--------------------------------------------------------------------------
echo off
"\\tide1\c$\Program Files\Beyond Compare 3\BCompare.exe" @"C:\Sync\Compare\CompareSakiv.txt"
IF %ERRORLEVEL% == 9009 GOTO BeyondCompareNotFoundError
GOTO end
:BeyondCompareNotFoundError
cls
echo ----------SCRIPT FAILURE-------------
echo BCompare.exe was not found under
echo C:\Program Files\Beyond Compare 3\
echo or script file not found
pause
GOTO end
:end
--------------------------------------------------------------------------
The contents of CompareSakiv.txt file is as follows
# INPUT:
# %1: ServerName A which requires Sync Up from LIVE Server i.e. ServerName B
# %2: ServerName B which will sync to ServerName A
# Load the base folders
load %1 "\c$\Sakiv" %2 "\c$\sakiv"
# Set the filters
filter "-*sprew*.*;-\splash\;-*WireCon-*.*;-DBrigl.ini;-TAreas.xsl"
#expand to affect subfolders and files
expand all
#Confirm if needed to override
option confirm:yes-to-all
#Criterias for compare
criteria size, modified
#Compare using binary if not crc
compare binary
#select mismatched files
select lt.diff.files lt.orphan.files
#copy files that have changed on the server to sync up i.e. servername A, when compared to the LIVE server i.e. servername B
copyto lt path:relative "\\%1\c$\Sync\Compare\sakiv_%t%"
# Copy different files right to left
sync create-empty update:right->left
# HTML Report
file-report layout:Summary &
options:display-mismatches,column-CRC,column-version,column-Modified &
output-to:%3 output-options:html-color %1 %2
title:sakiv Compare
--------------------------------------------------------------------------
The problem is when i run my main batch file, i get an error from the beyond compare application which is called unable to load the base folders. fatal error in scripts. scripts will now close.
I have 2 more folders to compare i.e. volcano and quake other then sakiv(all folders renamed here for security reasons). They all have the relevent batchfiles and script files too.
I'm just wondering if there is a better way to do this really
please help
regards
I have the following problem which i have elaborated as much as possible.
I have a batch file which performs the sync process between 2 servers. One of the steps in the batch file is to call beyond compare application and perform compare between 2 folders, backup mismatches and sync up the mismatches. The following step is what i have written above extracted from my main batch file
rem Compare the Sakiv directory between the 2 servers
Echo Step5 = Comparing Sakiv Folder between %1 and %2. Any Difference in File on %1 will be backedup before syncing with %2...........
Call C:\Sync\Compare\CompareSakivFolder.bat
The contents of CompareSakivFolder.bat file is as follows
--------------------------------------------------------------------------
call C:\Sync\Compare\BCSakiv.bat "%1\c$\sakiv" "%2\c$\sakiv"
--------------------------------------------------------------------------
The contents of BCSakiv.bat file is as follows
--------------------------------------------------------------------------
echo off
"\\tide1\c$\Program Files\Beyond Compare 3\BCompare.exe" @"C:\Sync\Compare\CompareSakiv.txt"
IF %ERRORLEVEL% == 9009 GOTO BeyondCompareNotFoundError
GOTO end
:BeyondCompareNotFoundError
cls
echo ----------SCRIPT FAILURE-------------
echo BCompare.exe was not found under
echo C:\Program Files\Beyond Compare 3\
echo or script file not found
pause
GOTO end
:end
--------------------------------------------------------------------------
The contents of CompareSakiv.txt file is as follows
# INPUT:
# %1: ServerName A which requires Sync Up from LIVE Server i.e. ServerName B
# %2: ServerName B which will sync to ServerName A
# Load the base folders
load %1 "\c$\Sakiv" %2 "\c$\sakiv"
# Set the filters
filter "-*sprew*.*;-\splash\;-*WireCon-*.*;-DBrigl.ini;-TAreas.xsl"
#expand to affect subfolders and files
expand all
#Confirm if needed to override
option confirm:yes-to-all
#Criterias for compare
criteria size, modified
#Compare using binary if not crc
compare binary
#select mismatched files
select lt.diff.files lt.orphan.files
#copy files that have changed on the server to sync up i.e. servername A, when compared to the LIVE server i.e. servername B
copyto lt path:relative "\\%1\c$\Sync\Compare\sakiv_%t%"
# Copy different files right to left
sync create-empty update:right->left
# HTML Report
file-report layout:Summary &
options:display-mismatches,column-CRC,column-version,column-Modified &
output-to:%3 output-options:html-color %1 %2
title:sakiv Compare
--------------------------------------------------------------------------
The problem is when i run my main batch file, i get an error from the beyond compare application which is called unable to load the base folders. fatal error in scripts. scripts will now close.
I have 2 more folders to compare i.e. volcano and quake other then sakiv(all folders renamed here for security reasons). They all have the relevent batchfiles and script files too.
I'm just wondering if there is a better way to do this really
please help
regards
Comment