-a--- 2007/1/18 12:50 16747465 msft122506vxam.wmv
-a--- 2004/12/29 5:37 89575366 msft122704vx.wmv
-a--- 2007/1/18 12:45 14558112 msft122706vxpm.wmv
-a--- 2004/12/30 11:48 80853128 msft123004vx.wmv
Thanks!
MG
If you can see the title text when you right click a file and look at the
Summary tab > title, then you can get it this way:
$shell = new-object -com shell.application
$folder = $shell.nameSpace("d:\webcast")
dir $folder.self.path -filter *.wmv | foreach {
$item = $folder.parseName($_.name)
$title = $folder.GetDetailsOf($item, 10)
$_ | add-member -p noteproperty Title $title
} | select name,title
I don't know of a way to set it.
---
Shay Levy
Windows PowerShell MVP
blog: http://blogs.microsoft.co.il/blogs/ScriptFanatic
MG> Hi,
MG> I have a lot of WebCast files like the follows. In explorer, I can
MG> seek the
MG> 'Title' column and find which I want. Can I get or set 'Title'
MG> information
MG> within PowerShell?
MG> -a--- 2007/1/18 12:50 16747465 msft122506vxam.wmv
MG> -a--- 2004/12/29 5:37 89575366 msft122704vx.wmv -a---
MG> 2007/1/18 12:45 14558112 msft122706vxpm.wmv -a---
MG> 2004/12/30 11:48 80853128 msft123004vx.wmv
MG>
MG> Thanks!
MG> MG
Shay's method works, and in fact works for any document type. There is no
equivalent for setting data using Shell. Application, but it's possible to
use Windows Media Player to do it from script. Here's a quick example; note
that the name of a media is the same as the Explorer title.
$wmp = new-object -comobject wmplayer.ocx
$media = $wmp.newMedia("D:\Data\Docs\webcast.wmv")
$media.name = "foo"
The metadata gets updated immediately.
MG
"Shay Levy [MVP]" <n...@addre.ss> wrote in message
news:89228ed234e478...@news.microsoft.com...
So I think may be the '10' is not for 'Title'. Am I right?
$title = $folder.GetDetailsOf($item, 10)
Thanks for your help.
MG
"Shay Levy [MVP]" <n...@addre.ss> wrote in message
news:89228ed234e478...@news.microsoft.com...
Thank you very much!
MG
"Alex K. Angelopoulos" <aka(at)mvps.org> wrote in message
news:uAr040r4...@TK2MSFTNGP02.phx.gbl...
Its 21 on Vista.
---
Shay Levy
Windows PowerShell MVP
blog: http://blogs.microsoft.co.il/blogs/ScriptFanatic
MG> Hi, Shay:
MG> I tried the script and the inforation I got seems 'File Owner' and
MG> not the
MG> 'Title' in Details tab of wmv file properties.
MG> Name Title
MG> ---- -----
MG> msft041905vxpm.wmv
MG> <MyComputerName>\<MyUserName>
MG> msft101304vx.wmv
MG> <MyComputerName>\<MyUserName>
MG> msft102505vxam.wmv
MG> <MyComputerName>\<MyUserName>
MG> msft122104vxam.wmv
MG> <MyComputerName>\<MyUserName>
MG> msft122506vxam.wmv
MG> <MyComputerName>\<MyUserName>
MG> msft122706vxpm.wmv
MG> <MyComputerName>\<MyUserName>
MG> So I think may be the '10' is not for 'Title'. Am I right? $title =
MG> $folder.GetDetailsOf($item, 10)
MG>
MG> Thanks for your help.
MG>
MG> MG
MG>
MG> "Shay Levy [MVP]" <n...@addre.ss> wrote in message
MG> news:89228ed234e478...@news.microsoft.com...
MG>
TagLib# works with audio *and* video, and gives you access to
everything from bitrates and formats to duration and metadata like
artist, title, album (if there is one), etc. There's an example on my
blog of how to write a filter that just adds all the tags to any media
file so you can do something like:
ls D:\webcast* | Add-MediaInfo | Format-Table Name, MediaTitle,
MediaComment, MediaDuration, CreationTime
--
Joel