[英]Powershell: Get-Childitem, is there a way to list comments?
這不是我的解決方案。 我只是通過此鏈接將其粘貼到此處
這是一些示例代碼:
http://powershell.com/cs/blogs/tobias/archive/2011/01/07/organizing-videos-and-music.aspx
假設您有一個視頻文件:C:\\ video.wmv
$path = 'C:\video.wmv'
$shell = New-Object -COMObject Shell.Application
$folder = Split-Path $path
$file = Split-Path $path -Leaf
$shellfolder = $shell.Namespace($folder)
$shellfile = $shellfolder.ParseName($file)
您需要知道擴展屬性的ID是什么。 這將顯示所有ID:
0..287 | Foreach-Object { '{0} = {1}' -f $_, $shellfolder.GetDetailsOf($null, $_) }
找到所需的文件后,您可以按以下方式訪問它:
$shellfolder.GetDetailsOf($shellfile, 216)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.