PDA

View Full Version : Batch file to compare 2 files and produce report


01-Oct-2004, 04:36 AM
Hi,

I'm using the following line in the batch:
START /W BC2.exe %workfile% %workfile2% file-report output-to:"C:\MyBatches\reports.htm"

The 2 filenames are taken from a settings file called at the start of the batch. This worked file using the /out notation, but I haven't been able to figure out the correct usage of file-report. I just need a simple report in html format. I'm using 2.2.7.

Any help appareciated!
Thanks.

Chris
01-Oct-2004, 10:20 AM
file-report is a scripting command, so it won't work from the command line.

Here's an example script you can use to generate your html report
file-report layout:side-by-side options:display-context output-to:%3 output-options:html-color %1 %2

To run the script from the command line, use the syntax:
bc2 @script.txt file1.txt file2.txt report.html

In your batch file, you can call the script using:
START /W BC2.exe @script.txt %workfile% %workfile2% "C:\MyBatches\reports.htm"

Command line arguments in the script are expanded as %1, %2, etc.

It is also possible to use the environment variables like %workfile% directly in the script.