PDA

View Full Version : Command-line folder comparison with bcomp.com doesn't stay in foreground


barrkel
03-Jan-2010, 09:15 AM
I'm trying to write a command-line script which compares multiple pairs of two folders, but I don't want to open up all the folders at once. I need to wait until Beyond Compare has finished with one folder before moving on to the next.

For files, bcomp.com has this behaviour. It blocks and waits until the file comparison is done. However, directories don't exhibit the same behaviour; instead, bcomp.com exits immediately after it has created a tab in Beyond Compare.

Is there a switch I'm missing?

Chris
04-Jan-2010, 11:46 AM
BC doesn't have a command line switch to do this. However, if you're calling BC from a batch file or command prompt you can use "start /wait" to call BC. This will wait for the first instance to be closed before the next command is issued.

Example:
start /wait bcompare.exe folder1 folder2
start /wait bcompare.exe folder3 folder4

Chris
04-Jan-2010, 11:47 AM
If you don't need to display the interface, you might also consider BC's built in scripting support. See the "Using Beyond Compare > Automating With Scripts" topic in BC3's help file for details.