• 0

Batch strip metadata from files


Question

I need a program (free or paid) that will strip the metadata from Microsoft Office documents (Excel, Word, Powerpoint) and Adobe PDF's.

I found BatchPurifier, but it does not do it for Microsoft Office 2003 documents.

I have hundreds of documents that I need scrubbed so individually doing it is not a viable option.

Any suggestions? Thanks

Link to comment
https://www.neowin.net/forum/topic/920260-batch-strip-metadata-from-files/
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Here is the tool from MS for doing it

http://www.microsoft.com/downloads/details.aspx?familyid=144e54ed-d43e-42ca-bc7b-5446d34e5360&displaylang=en

Office 2003/XP Add-in: Remove Hidden Data

Brief Description

With this add-in you can permanently remove hidden data and collaboration data, such as change tracking and comments, from Microsoft Word, Microsoft Excel, and Microsoft PowerPoint files.

You can run the Remove Hidden Data add-in on individual files from within your Office XP or Office 2003 application. Or, you can run Remove Hidden Data on multiple files at once from the command line. In either case, to run the tool you must have the application installed in which the document was created.

  • 0

Thanks for responding. I had already tried that, but it wanted Office 2003 and I am using 2010. Also, it would only handle 2003 stuff from what I can tell.

I finally found/finagled a free solution. It is based off this. This will strip/scrub metadata from most types of files (except zips/archives).

I changed some things and wrote a readme. You will need dsofile.dll which can be found here from Microsoft.

  Quote

This script will remove metadata/properties from files in a folder and all sub-folders.

More specifically this will clear the following fields of metadata: Author, Category, Comments, Company, Keywords, LastSavedBy, Manager, Subject and Title.

You must run this program on an x86 machine, or it will throw an error.

1st - Copy dsofile.dll to C:\Windows\System32

2nd - Start, run, cmd. Run the command "regsvr32 C:\Windows\System32\dsofile.dll"

3rd - Place scrub.vbs in the folder that contains the files you want to scrub.

4th - Double click on scrub.vbs. If you do not see a message saying everthing went okay within a few minutes, then run this vbs file from the command line to check for errors.

Option Explicit

Dim objFSO 'module Level Object
Dim objDSOFile 'module Level Object

call Main

sub Main
	Dim objFolder
	Set objFSO = CreateObject("Scripting.FileSystemObject")
	Set objDSOFile = CreateObject("DSOFile.OleDocumentProperties")
	Set objFolder = objFSO.GetFolder(".")

	call ProcessFolder(objFolder)

	Set objFSO = nothing
	Set objDSOFile = nothing

end sub

Sub ProcessFolder(objFolder)
	dim objFiles,objFile
	dim objSubFolders,objSubFolder

	Set objFiles = objFolder.Files

	For Each objFile In objFiles
		if lcase(objFSO.getExtensionname(objFile)) <> "zip" then
			call OverWriteFile(objFile)
		end if
	Next

	Set objSubFolders = objFolder.SubFolders

	For Each objSubFolder in ObjSubFolders
		call ProcessFolder(objSubFolder)
	Next

end Sub

Sub OverWriteFile(objFile)
    objDSOFile.Open(objFile.Path)
    objDSOFile.SummaryProperties.Author = " "
    objDSOFile.SummaryProperties.Category = " "
    objDSOFile.SummaryProperties.Comments = " "
    objDSOFile.SummaryProperties.Company = " "
    objDSOFile.SummaryProperties.Keywords = " "
    objDSOFile.SummaryProperties.LastSavedBy = " "
    objDSOFile.SummaryProperties.Manager = " "
    objDSOFile.SummaryProperties.Subject = " "
    objDSOFile.SummaryProperties.Title = " "
    objDSOFile.Save
    objDSOFile.Close
end sub

msgbox "Everything completed successfully. Please verify files."

Wscript.quit

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I think you forgot there's a ugly huge bar carved in the top of the screen.
    • There won't be any major changes from beta to release.
    • Having been using Windows for 30 years and 3 Surface Pros in the meantime (4,6,9) and recently bought a 15" macbook air m4. The OS is indeed a big deal. Hardware wise the surface pro feels as nice as macbook air, but Windows...man it's it's own enemy now
    • 2013 to 2017...wtf, is Steve on the wacky tabacky? Never heard of this or this Nathan guy in Australia.
    • Dell says it can't be blamed for Windows Night Light breaking on its Arm PCs by Usama Jawad Night Light is a very handy feature that is available by default in Windows 10 and Windows 11. Essentially, when you toggle it on, Windows reduces the emission of blue light from the display which in turn decreases the stress on eyes and can potentially aid in better sleep too. While this feature generally works quite well, this hasn't been the case so far on some Dell PCs. Now, Dell has acknowledged the issue in a recently published support document. As the situation currently stands, Night Light does not work on the secondary display on certain Windows Arm PCs when an external monitor is connected to them. This happens on the following PC models: Inspiron 14 5441 Inspiron 14 Plus 7441 Latitude 5455 Latitude 7455 XPS 13 9345 Now, Dell has confirmed that this is not due to any hardware or software issue on its side, it's just a limitation of the Qualcomm Oryon chipset. In essence, this is a problem that is outside the control of Dell. What this means is that while customers can utilize built-in and third-party tools to adjust the color profiles of their displays, Dell can't really get Windows Night Light to work as-is on external displays connected to any of the Arm PCs listed above. The company has emphasized that there are no plans to support Windows Night Light on its existing Arm PCs, and that customers will just have to make do with what they have. However, this feature will likely work as designed with the "next generation" of Arm computers, which will presumably leverage a chipset that is not held back by this limitation. Windows on Arm has enjoyed decent support from software developers in recent times; Microsoft will be hoping that it can keep the momentum going with its next Snapdragon PCs.
  • Recent Achievements

    • Week One Done
      moojay67 earned a badge
      Week One Done
    • Dedicated
      lethalman earned a badge
      Dedicated
    • Week One Done
      B4dM1k3 earned a badge
      Week One Done
    • One Month Later
      adnan.hebibovic earned a badge
      One Month Later
    • Week One Done
      adnan.hebibovic earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      595
    2. 2
      ATLien_0
      219
    3. 3
      Michael Scrip
      198
    4. 4
      +FloatingFatMan
      144
    5. 5
      Xenon
      135
  • Tell a friend

    Love Neowin? Tell a friend!