使用 powershell 编辑文件的 VersionInfo

Edit VersionInfo of a file using powershell

我想使用文件 VersionInfo 中的空字段来存储用于搜索目的的元数据。我想知道是否可以使用 powershell cmdlet 或脚本编辑 VersionInfo 字段。

可以使用以下命令查看版本信息:

get-itemproperty -path .\amazon_cel_v2l.dvf | Format-List -Property VersionInfo

输出:

VersionInfo : File:             C:\extended_attributes\amazon_cel_v2l.dvf
              InternalName:
              OriginalFilename:
              FileVersion:
              FileDescription:
              Product:
              ProductVersion:
              Debug:            False
              Patched:          False
              PreRelease:       False
              PrivateBuild:     False
              SpecialBuild:     False
              Language:

如您所见,有几个不同的空字段可以用元数据填充。有谁知道 if/how 这些字段可以写入?特别是我想使用下面列出的四个字段:

              InternalName:
              OriginalFilename:
              FileVersion:
              FileDescription:

根据我的问题中的评论,我将尝试想出一种不同的方法来将自定义元数据添加到我的文件中。备用数据流很好,但如果将文件传输到非 ntfs 文件系统,则会丢失。