Comparing text files

Hello,

This is my first post here and I hope I am doing it all right and not violating any rule.

So, I want to compare two big model files and going through each of them line by line and character by character will be so tedious. Do you know any light software or text editor that will do the job for me? i.e. compare files and identify all the differences?

This might be a general question not related to Dynare specifically but consider it for .model file :slight_smile: : )

P.S. I know about this excellent free tool https://freefilesync.org/manual.php but it only tells me that two files are not the same, so there are difference but does not tell me exactly how the two differ.

Matlab’s Editor has a “Compare” tool. Alternatively: https://www.git-tower.com/blog/diff-tools-windows/

1 Like

Hi, In matlab command window just do:

>> visdiff('model1.mod', 'model2.mod')

a window will pop up showing the differences between the two files. See:

Best,
Stéphane.

1 Like

Thanks a lot. :slight_smile: “Compare” tool in Matlab’s Editor is works great.

Thanks for the code. Kept under my belt!

Best,
Giorgi.