- (new-object -com wmplayer.ocx).newMedia($f).getItemInfo("Duration") |%{ [timespan]::fromseconds($_).tostring("hh\:mm\:ss")}
复制代码 分开写更好,- $sec=(new-object -com wmplayer.ocx).newMedia($m).getItemInfo("Duration")
- [timespan]::fromseconds($sec).tostring("hh\:mm\:ss")
复制代码
|