如何访问“详细信息" (“标题",“主题"等)在Perl或PowerShell脚本中的文件属性 [英] How do I access "Details" ("Title", "Subject", etc.) of file properties in Perl or PowerShell script

查看:144
本文介绍了如何访问“详细信息" (“标题",“主题"等)在Perl或PowerShell脚本中的文件属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果人们在Windows资源管理器中查看文件属性,则详细信息"选项卡-对于许多文件类型(例如,tiff或jpeg图像,Office文档等),将在说明"部分中显示标题" ",主题",标签"和评论".有没有办法从Perl或PowerShell脚本读取/写入这些字段?

If one looks at file properties in Windows Explorer, the "Details" tab, - for many filetypes (for example, tiff or jpeg images, Office documents, etc.) there is the "Description" section with fields like "Title", "Subject", "Tags", and "Comments". Is there a way to read/write these fields from Perl or a PowerShell script?

推荐答案

PowerShell经历了一些迭代,现在可以使用本机命令来实现: Get-ItemProperty

PowerShell has gone through some iterations, and this can now be achieved with a native command: Get-ItemProperty

示例:显示ntdll.dll文件的当前详细信息:

Example: Shows the current details of ntdll.dll file:

Get-ItemProperty C:\Windows\System32\ntdll.dll | format-list

这篇关于如何访问“详细信息" (“标题",“主题"等)在Perl或PowerShell脚本中的文件属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆