有没有办法从 WMC .WTV 文件中批量提取电视节目描述?

有没有办法从 WMC .WTV 文件中批量提取电视节目描述?

我从 Windows Media Center 录制了相当多的广播和电视节目,并使用 Karen 的 Powertools 目录打印机,将它们从 Win Explorer 按文件名列出到 .txt 文件中(随后列出到电子表格中)。

许多节目都有相同的标题,但通常都有自己的节目描述。Karen 的目录打印机提取了许多节目详细信息,但没有提取节目描述

理想情况下,我希望能够在 Windows 资源管理器中选择一堆文件名,并通过常用的 .txt 文件或直接将程序描述作为一行文本复制到电子表格中。

(我已经尝试联系‘Joe Winett’[电子邮件保护]但没有收到回复;并尝试了软件推荐 SE)

请问有什么建议吗?

答案1

根据要求,这里有一个脚本,它将输出文件夹中所有 WTV 文件的元数据。将以下内容放入记事本(或您选择的文本编辑器)并将其保存为extract-metadata.vbs

Option Explicit

Dim oShell : Set oShell  = CreateObject("Shell.Application")
Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")
Dim oFolder : Set oFolder = oShell.Namespace(oFSO.GetParentFolderName(Wscript.ScriptFullName))
Dim oFile, iPos, sHeader(999), sVal

' Get the names of each of the fields.

For iPos = 0 to 999
    sHeader(iPos) = oFolder.GetDetailsOf(oFolder.Items, iPos)
Next

' For each file in the folder, get the data in that field and (assuming it's not
' empty) display it.

For Each oFile in oFolder.Items
    For iPos = 0 To 999
        sVal = oFolder.GetDetailsOf(oFolder.ParseName(oFile.Name), iPos)
        If sVal <> "" Then WScript.Echo sHeader(iPos) & " (" & iPos & "): " & sVal
    Next
Next

Set oShell = Nothing
Set oFSO = Nothing
Set oFolder = Nothing

打开命令行,转到包含文件的文件夹并运行以下命令:

cscript extract-metadata.vbs > output.txt

打开output.txt你会看到类似这样的内容(注意:不是我的录音!):

Name (0): The Only Way Is Essex_ITV2 +1_2011_09_25_23_12_00.wtv
Size (1): 721 MB
Item type (2): Windows Recorded TV Show
Date modified (3): 26/09/2011 09:17
Date created (4): 23/10/2011 18:17
Date accessed (5): 23/10/2011 18:17
Attributes (6): A
Perceived type (9): Video
Owner (10): Administrators
Kind (11): Recorded TV
Genre (16): Shows;Other Shows
Rating (19): Unrated
Title (21): The Only Way Is Essex
Length (27): 00:50:57
Protected (29): No
Computer (53): RICHARD-PC (this computer)
Filename (155): The Only Way Is Essex_ITV2 +1_2011_09_25_23_12_00.wtv
Shared (173): No
Folder name (176): Recorded TV
Folder path (177): C:\Users\Public\Recorded TV
Folder (178): Recorded TV (C:\Users\Public)
Path (180): C:\Users\Public\Recorded TV\The Only Way Is Essex_ITV2 +1_2011_09_25_23_12_00.wtv
Type (182): Windows Recorded TV Show
Link status (188): Unresolved
Date released (192): 0
Channel number (253): 27
Closed captioning (255): No
Rerun (256): No
SAP (257): No
Program description (259): New: Brand new series of the true life soap. It is Jess's 26th birthday party. Kirk has a new boy toy, and Mark's on a journey of self discovery and enlightenment. [S]
Recording time (260): ?25/?09/?2011 ??23:12
Station call sign (261): ITV2 +1
Station name (262): ITV2 +1
Sharing status (269): Not shared

如您所见,字段21有标题,字段259有描述。值得注意的是,如果您使用 Windows 8 上的 Windows Media Center 录制节目,则描述在字段中268

希望这能为您提供 10 的启动器,让您能够提取记录数据并填充 csv 文件以便在电子表格中打开。

如果您遇到困难,请告诉我,我会尽力帮助您。

相关内容