LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I compare files?

I have a file in a CVI project that I want to compare to a file with the same name in someone else project. I tried using the edit-->diff feature to compare the two files, but I'm only provided with a limited list of files to compare to. How can I set this up so I can browse any file to compare to?
0 Kudos
Message 1 of 7
(5,496 Views)

Apart other specialized utilities, for text files (*.c and *.h) you can rely on the system fc command redirecting the output to a file: the corresponding command is "fc FilePathName1.c FilePathName2.c > differences.txt". Differences output file is a text file that lists all differences found.

This is a rudimentary tool that can be useful for files with a similar structure and a limited set of differences; I use it when I have to discover the differences introduced between two close versions of a source code.

With the same scope I have used it to compare two UIR file after having saved them in text format (*.tui). Again, since the comparison is performed character by character it is useful for very similar files with few differences.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 7
(5,491 Views)

Wikipedia lists a number of file comparison utilities here, including several freeware options.

 

I can personally recommend Beyond Compare, which is excellent but not free.

 

Colin.

 

0 Kudos
Message 3 of 7
(5,481 Views)

when using the "Edit/Diff/Diff with..." menu, you are prompted with a list of edit windows, aka. opened files: the files in the list are the files currently opened in CVI. so for the file from another project to appear here, you only have to open it in CVI before trying the diff. anyway, this diff tool seems completely useless...

 

personally, i would recommend WinMerge, which is excellent AND free ! it is graphical, simple to use and allows to diff entire directories, which is a plus when comparing 2 working copies of the same project.

Message 4 of 7
(5,457 Views)

dummy_decoy wrote:
i would recommend WinMerge

I can only agree with you dummy_decoy. WinMerge is a great tool to compare files (and more)

Regards,

0 Kudos
Message 5 of 7
(5,427 Views)

dummy_dec…s answer let's me compare the files, though I don't know if it will let me compare files with teh same name. I was also hoping for a better compare interface, but hopefully that will at least be added to future versions of CVI. 

0 Kudos
Message 6 of 7
(5,418 Views)

Hi Steve,

 

The procedure described by dummy_dec is correct and will allow you to compare two files with the same filename. The tool available in CVI is rather simple, but it does give you the necessary tools to compare the two files.

 

What are some specific details that you like to see in the CVI Diff tool?

Nestor
0 Kudos
Message 7 of 7
(5,406 Views)