I have two CNC setup files that are 75 and 79K respectively. The files are ascii program source code. I need to know what's different between them. Is there some sort of utility that will highlight differences between two files automatically?
Karl
P.S. "THE BEAST", my Mazak M4, is coming back to life. Both tool turrets work, X and Z axis servos running. Lots of misc. I/O up and running. Looks like serious spindle drive trouble ahead. Hoping its in the programming for the spindle.
If you have two versions of the same text file, you can use Extra|Compare Files to visualize the differences between those files. After that, you can edit the generated difference file to merge both versions into a single, new file.
First you need to open the two files you want to compare. The Extra|Compare Files menu item will be grayed out until you have two or more files open.
Microsoft Word 2002 (XP Office?) does it too. From it's help file:
Compare and merge documents Open the edited copy of the document. On the Tools menu, click Compare and Merge Documents. Select the original document, click the arrow next to Merge, and then do one of the following: To display the results of the comparison in the original document, click Merge. To display the results in the currently open document, click Merge into current document. To display the results in a new document, click Merge into new document. Notes To ensure the best possible merge results, make sure that the Store random number to improve merge accuracy check box is selected on the Security tab of the Options dialog box (click Options on the Tools menu). If you've used the Versions command on the File menu to save multiple versions of the document in one file, and you want to compare the current version with an earlier one, you must first save the earlier version as a separate file under a different name.
It looks like you are using a Windows PC. If so, you should be able to run "fc.exe " from a DOS Command Prompt window on the two files.
In Windows XP the sequence would be:
Start | All Programs | Acessories | Command Prompt
Once in the DOS window, type "fc /?" to see the options for executing the command. AIR, "fc" is shorthand for "file compare" and you can probably direct the output to your printer by appending "> LPT:" to the end of the command line
The lines of "*** number range ***" and "--- number-range ---" show the related lines from the two files. Lines which are changed are marked with a '!' at the left margin. Added lines or removed lines are marked with either '+' or '-' at the left margin. I used the "-c" option, which adds a few lines of context around the changed sections, making them easier to recongnize. Other options will output the differences in a format which can be fed to the "ed" program (simple line editor) to convert one file into another.
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.