Forum › Forums › New users › New Users and General Questions › Compare doc files
- This topic has 12 replies, 6 voices, and was last updated Apr 23-7:14 am by andfree.
-
AuthorPosts
-
April 21, 2023 at 5:25 am #105129Member
andfree
Hi. Is there any way to compare two doc files (or two versions of the same file) and find the differences? Thanks.
April 21, 2023 at 5:36 am #105130MemberLead Farmer
April 21, 2023 at 9:35 am #105135MemberRJP
::Install meld and compare using graphical application.
sudo apt install meldApril 21, 2023 at 10:25 am #105137MemberRobin
::Since this question is about „doc”-files, which is not a plain .txt file you could compare directly, you won’t get useful results with meld. You have two options:
A.) Open the documents with Libreoffice. Save them as simple .txt files. Then you can compare them easily with meld, as suggested by RJP.
B.) Open the second document with Libreoffice.
– From Edit menu select „Differences/Changes” → „Compare Document…”.
– In the dialog box select the original document and click „Open”.The Libreoffice Writer should find and highlight all differences between the documents and show another dialogbox for accept or reject the changes one by one, while walking through the text.
Windows is like a submarine. Open a window and serious problems will start.
April 21, 2023 at 12:29 pm #105145Member
techore
::Both rjp and Robin’s recommendation are excellent.
If going with Robin’s suggestion A and the file is large and has a lot of formatting, you may want to consider exporting to .rtf or richtext versus text. It a decision point for you. Using richtext will retain much of the formatting codes and you can directly edit the file in meld, save, load the updated file into Libreoffice, and save as .doc.
April 22, 2023 at 4:24 am #105194Memberandfree
::Many thanks for all the replies.
Open the second document with Libreoffice.
– From Edit menu select „Differences/Changes” → „Compare Document…”.I see „Differences/Changes” or „Compare Document…” nowhere in the Edit or other menu of the Libreoffice (version 7.4.5.1).
$ diff list.docx list2.docx Binary files list.docx and list2.docx differ$ cmp list.docx list2.docx list.docx list2.docx differ: byte 11, line 1If this means there’s a difference in the 11th character (including spaces) of the 1st line, I don’t see it.
$ tput list.doc list2.doc tput: unknown terminfo capability 'list.doc'$ meld list.txt list2.txt
$ meld list.rtf list2.rtf
The output for both of them is: “Files are identical”.- This reply was modified 1 week, 4 days ago by andfree.
- This reply was modified 1 week, 4 days ago by andfree.
April 22, 2023 at 7:50 am #105205MemberLead Farmer
::If this means there’s a difference in the 11th character (including spaces) of the 1st line, I don’t see it.
The diff and cmp commands don’t work with docx files. I test it and I got the same thing.
If the files are plain text, you can try save as .txt files, and use the diff and cmp command.April 22, 2023 at 8:04 am #105206Memberandfree
::If the files are plain text, you can try save as .txt files, and use the diff and cmp command.
Thanks, but, as I wrote above, if I save them as .txt or .rtf, then the two files are identical:
$ diff list.txt list2.txt
$ cmp list.txt list2.txtNo difference found.
- This reply was modified 1 week, 4 days ago by andfree.
- This reply was modified 1 week, 4 days ago by andfree.
April 22, 2023 at 4:51 pm #105226Member
techore
::The output for both of them is: “Files are identical”.
Execute meld as a gui app and inspect the files. Meld permits intuitive visual inspection and editing. Based on the output you provided, it looks as if you ran it as a cli command. If the results are a concern, then inspect using the GUI.
Make sure to close any other apps like libreoffice if you have the files open with them to avoid confusion and possibly locking files.
April 22, 2023 at 5:05 pm #105227MemberXunzi_23
::Compare is built in to LO Writer.
Open the newest version in Writer then EDIT > TRACK CHANGES > COMPARE DOCUMENT then select the older document.
See HELP > DOCUMENTS COMPARING for more information
Compare is built in to LO Writer.
April 23, 2023 at 4:36 am #105263Memberandfree
::Execute meld as a gui app and inspect the files. Meld permits intuitive visual inspection and editing. Based on the output you provided, it looks as if you ran it as a cli command. If the results are a concern, then inspect using the GUI.
Sorry that I didn’t make it clear. As “output”, I meant the result as appear in the GUI, not a terminal output. If I first open the GUI and afterwards select the files, this makes no difference to the result: “Files are identical”, again.
EDIT > TRACK CHANGES > COMPARE DOCUMENT
Many thanks, “Compare Document” is there. I tested it with two random files and it works. But it doesn’t find any difference between the list.docx & the list2.docx files.
See HELP > DOCUMENTS COMPARING for more information
Unfortunately, I don’t see any “Compare Document” entry in the “Help” menu.
- This reply was modified 1 week, 3 days ago by andfree.
April 23, 2023 at 6:39 am #105273MemberXunzi_23
::Hi andfree, I have no local help installed and running LO 7.5.2,
would start with below, if neccesary changing version number.
I think proceedure is same for most LO versions.Should known differences not be detected be good to post a report to LO Org.
https://help.libreoffice.org/6.4/en-US/text/shared/guide/redlining_doccompare.html?DbPAR=SHARED
April 23, 2023 at 7:14 am #105274Memberandfree
::Should known differences not be detected be good to post a report to LO Org.
Hi. After all, I’m convinced that there’s no difference as regards the content of the two files. I think there’s no reason to waste more of our time. Thanks again.
-
AuthorPosts
- You must be logged in to reply to this topic.