Dos Script Compare Two Files

Posted on  by  admin

Hello everybodyI want to compare 2 text files in DOS-Box / command line. My files are really text files and have the extension DCM. For that I already created a new file format in Tools file formats:.DCMX Trim trailing whitespaceGrammar:Comment(X) LinesText matching: ^.^rn.X Regular expressionX Insert spaces instead of tabsTab stop: 4As I have read for comparing within batch jobs on command line I have to use bcomp.com. I am assuming that's right.I have tried that command line call, but it does not write any file./silent /closescript /qc /ro /iu /automerge /savetarget=bc-target.dcm /mergeoutput=bc-merge.dcm mysrc.dcm.mydest.dcmHas anybody some hints please?My goal is to get a file with the differences and if possible also an exit code like ERRORLEVEL under Windows.regards.

Hello,BC4 requires a graphical environment option to run, so while it would run from the Windows command line, it would not run in a DOS only environment. For this testing, please try from the Windows Command Prompt.Also, for any troubleshooting, you should remove /silent, which suppresses all warnings or error dialogs. Several of your selected command line arguments do not support simultaneous execution: /qc is specific for two files, but wouldn't work with an /automerge, while /savetarget and /mergeoutput also are for separate tasks.To get an error level for the comparison, use:bcomp.com /qc 'c:file1' 'c:file2'to generate a report of the differences, you would need to use script as a separate call (which will not overlap with /qc):bcomp.exe '@c:bcscript.txt' 'c:file1' 'c:file2' 'c:tempbcreport.html'where bcscript.txt is. BC4 can run with /silent or /closescript to suppress the interface or close it after running, but it has to be run in an environment where the interface is possible. The first test is to call 'bcompare.exe' by itself to make sure the program can run and launch, showing the main dialog.

Compare Two Files Free

Two

Compare Two Scripts Online

If it can, this location can also run scripting. This is more commonly a question for Linux, where the OS may be a Terminal with no graphical components. For Windows, Windows is almost always set up to allow a graphical interface. However, you mentioned DOS Box, which is a DOS environment and not the same as a Windows Command Line.I always suggest avoiding /silent until the script is up and running after some testing. /silent suppresses everything, including any warning dialogs or error messages, so it is extremely difficult to troubleshoot while it is in place.

Coments are closed