View Full Version : sync
oli82
06-Apr-2011, 04:52 AM
Hi I am trying to automate a sync and getting a bit lost
I first call the script which works
C:\Program Files (x86)\Beyond Compare 3\BCompare.exe "@C:\BeyondCompareScript.txt"
I then try this
log verbose "c:\logs\logfilename.txt"
load WebDavSync
sync mirror:left->right
but I get the error
06/04/2011 11:41:21 *** Beyond Compare 3 Evaluation -- 30 days remaining ***
06/04/2011 11:41:21 >> log verbose "c:\logs\logfilename.txt"
06/04/2011 11:41:21 >> load WebDavSync
06/04/2011 11:41:21 Fatal Scripting Error: Loaded session must be Folder Compare session
06/04/2011 11:41:25 Script completed in 4.28 seconds
webdavsync is the name of my session that is a folder sync session. can you please help me make this work.
Many Thanks,
Oliver
Aaron
06-Apr-2011, 09:14 AM
Hello,
You will need to re-save your current Folder Sync session as a Folder Compare session. Folder Sync sessions are not currently supported in script. This is pretty easy to do in the graphical interface, and will only need to be done once (to open and re-save it as a new session type.)
Load your Folder Sync session, then go to the session menu and select Compare Base Folders near the bottom. This will open a new tab, a Folder Compare session, with your current folders and session settings. Go to the Session menu -> Save Session As and save this new Folder Compare session to use in your script.
Let us know if you have any questions.
oli82
06-Apr-2011, 09:46 AM
great thanks for the help this worked.
can you detail how I set this up as a windows task and close the dialog box when finished automatically.
Many Thanks,
Oliver
Aaron
07-Apr-2011, 03:35 PM
Hello,
For setting up a Windows Scheduled Task, that will depend on your version of Windows. I would suggest booting up the Task Scheduler and trying to add a New Task, using the setup wizard. It's usually not too hard to create a sample task (which could just launch Beyond Compare or any other program, such as Notepad). Once you get that working, go back and edit the command line to call the script.
To automatically close the script dialog, go to the Tools menu -> Options, Script section. Here you can enable/disable an option to automatically close script windows.
oli82
08-Apr-2011, 02:30 AM
Hi,
I setup thr task, but for some reason it doesnt run because it asks for permission to delete files during the sync process. Its only when you click on that it carries on. Is there anyway that it will delete the files automatically without prompting?
Many Thanks,
Oliver
Aaron
08-Apr-2011, 09:11 AM
Hello,
Add this line to the top of your script:
option confirm:yes-to-all
This will answer "Yes" to any BC dialogs that pop up during script, whether it is Delete?, Overwrite?, or any others. I suggest testing the script on already backed up data or test folders while learning how the script will interact with your files. By attempting a delete and removing the prompt, you won't get a warning before it deletes files.
oli82
08-Apr-2011, 09:46 AM
that did the trick
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.