Powered By GitBook
How to use Beyond Compare to confirm 100% replacement
Situation: It is easy to imagine having a pair of folders where every instance of path="development/js/magister.js" was supposed to have been replaced with path="production/js/magister.js". We want to inspect to confirm that all of the replacements actually occurred.
Or in generic terms, you want to view the text in two files to confirm APPLE in File 1 was reliably replaced with ORANGE in File 2.
The solution in Beyond Compare is to first, make a replacement rule. Then, make a grammar rule for a Beyond Compare File Format.
Step 1: At first the file looks like this. Because the second file is meant for production, every path has been changed to say production. The problem is, Lines 1, 3, 4, 5 should show up as beige and Line 2 should show up red, because it is the only bad line.
Step 2: In the Beyond Compare menu go to Tools->Replacements.
Step 3: In the Beyond menu Tools->FileFormats
Step 4: From now on, whenever you want to compare two files, use the dropdown to force your new format on the right pane only. And we see Line 2 is now the ONLY difference. Done!
To save these steps permanently go to Session->SaveSession. In the future, you can resume these settings by going to Session->OpenSession.
Last modified 2yr ago
Copy link