简体   繁体   English

从PowerShell中的文件中删除属性

[英]Remove properties from files in powershell

I need to remove all properties (title, author, camera,...) from files in one folder with PowerShell (in Windows 10).我需要使用 PowerShell(在 Windows 10 中)从一个文件夹中的文件中删除所有属性(标题、作者、相机...)。 Is that even possible or any simple command to do that or would I need to remove each property one by one?这甚至可能或任何简单的命令可以做到这一点,还是我需要一个一个地删除每个属性?

If you need a simple one-off solution or occasional solution Windows explorer has this function built-in.如果您需要一个简单的一次性解决方案或偶尔的解决方案,Windows 资源管理器内置了此功能。

  1. Select all your files in the folder.选择文件夹中的所有文件。
  2. Right click one and select Properties then Details tab.右键单击一个并选择属性,然后选择详细信息选项卡。
  3. Bottom of Properties has "Remove Properties and Personal Information" --Has options to create copies of files with properties removed or remove from active files.属性底部有“删除属性和个人信息”——具有创建已删除属性的文件副本或从活动文件中删除的选项。 Select properties individually or Select All.单独选择属性或全选。

删除元

This blog post explains how to do it for exel files, you can adjust it to work for other file types as well.这篇博客文章解释了如何对 exel 文件执行此操作,您也可以对其进行调整以适用于其他文件类型。

https://devblogs.microsoft.com/scripting/use-powershell-to-remove-personal-information-from-excel/ https://devblogs.microsoft.com/scripting/use-powershell-to-remove-personal-information-from-excel/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM