close
Blogtrottr
批踢踢實業坊 Windows 板
 
Shop the Official Crayola Store

Find art supplies for outdoor play, coloring books for indoor play and lots more. Visit our colorful online store today.
From our sponsors
Re: [問題] 如何列出資料夾下所有影片長度
Jul 22nd 2014, 17:23, by ddd321

作者ddd321 (-d)

看板Windows

標題Re: [問題] 如何列出資料夾下所有影片長度

時間Tue Jul 22 17:23:24 2014

把以下內容存成 *.ps1 ,放到影片旁邊 對著ps1檔按右鍵 → 用PowerShell執行 win8測過可以,希望 win7也可以 =================================================== $Shell = New-Object -Com "Shell.Application" dir *.wmv | % { $File = $Shell.NameSpace($_.DirectoryName).ParseName($_.Name) $Duration = $File.ExtendedProperty("Duration") if ($Duration -ne $null ) { $T = New-TimeSpan -Seconds ($Duration / (1000*1000*10) ) $Time = $T.tostring() } else {$Time = ""} "$Time " + $_.name # 多加的,如果有人需要的話 # $Width = $File.ExtendedProperty("System.Video.FrameWidth") # $Height = $File.ExtendedProperty("System.Video.FrameHeight") # WMV之外的影片,系統可能需要裝Codec (不確定…) # 如果副檔名給錯的話,可能會顯示不出來 # 例如,容器是mp4,副檔名卻用avi } > 影片時間.txt ii 影片時間.txt -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.230.108.251 ※ 文章網址: http://www.ptt.cc/bbs/Windows/M.1406021007.A.052.html ※ 編輯: ddd321 (61.230.108.251), 07/22/2014 17:27:10

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 jmuko102 的頭像
    jmuko102

    new htc one開箱,htc手機評價,htc手機比較,htc手機遊戲,htc手機維修,htc手機價位,htc手機推薦,htc手機鈴聲,中華電信htc手機,htc手機截圖,亞太htc手機,

    jmuko102 發表在 痞客邦 留言(0) 人氣()