You need a tool for mass deletion of personal data (Author, Organization, Manager, etc.) from Microsoft Word / Excel / etc documents

What are the means for this?

What are ready-made solutions with the ability to work from the command line?

What can you recommend modules / for this?

Platform / language does not matter.

  • A little advice: if the platform / language doesn't matter to you, then C++ (I don't know C# ) is clearly superfluous. Instead, specify the tag Perl , Powershell . Also indicate if you have Cygwin or something similar installed, in which case the Cygwin/Bash/Gow/... tag will not interfere. If there is a linux - in general Linux tag. This is my personal opinion, do not take it as a comment from the moderator. - theoden
  • @theoden: how will you process Office Open XML documents from the shell? - Nick Volynkin
  • @NickVolynkin, I expressed my opinion purely from my own guesses. This data can be obtained utility. It’s most likely possible to edit them. With ++ under such circumstances, it looks like shooting sparrows with guns. If not a utility, then perl is certainly more appropriate, like its cpan . If I knew specifically what to do, I would have answered so, or I would have thrown a friend to try. - theoden
  • @theoden: put new tags, because I suspect that .NET should have libraries for processing MS Office documents) - Nick Volynkin

1 answer 1

On C #, put the Open XML SDK , add references to DocumentFormat.OpenXml and WindowsBase, and clean the necessary properties with the code:

 using DocumentFormat.OpenXml.Packaging; public static void CleanupMetadata(string path) { using (var document = WordprocessingDocument.Open(path, true)) { document.PackageProperties.Creator = null; document.PackageProperties.LastModifiedBy = null; } } 

If the solution is fundamentally from the shell, the code above can be easily rewritten to powershell.