Can I clean up documents from the command line?

Hi - I’ve just started to use libreoffice from the command line (linux) to convert doc to docx files and it works like a charm. However, there’s a few more things I need to do to a big number of documents and it would be amazing if there was a a way to do it from cmd:

  • Delete all comments for the whole document.
  • Clear direct formatting for the whole document.
  • Accept all tracked changes.

If there’s any way to do this from the command lineplease let me know. I have a folder of 200+ docx files I need to do this to.

1 Like

Only, and ONLY, if you know what you’re doing from the command line…

You can do irreparable damage to your files this way. PLEASE test on a copy of your file before proceeding. Don’t make me regret answering this question.

Thanks for the link gtomorrow, and for the warning. Is the danger that you’re editing the zipped xml files directly, so you can corrupt the whole document?

ABSOLUTELY! That’s why I said to test on a copy of your file.