Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Duration of a Media file

Aug
2,059
83
Code:
@setlocal
@echo off
pshell /s "$theFolder = 'C:\Users\jlc\Videos'"
pshell /s "$theFile = 'Lana Del Rey - Love.mp4'"
pshell /s "$DurationColumn = 27"
pshell /s "$oShell = New-Object -com Shell.Application"
pshell /s "$oFolder = $oShell.Namespace($theFolder)"
pshell /s "$oFile = $oFolder.ParseName($theFile)"
pshell /s "$Duration = $oFolder.GetDetailsOf($oFile, $DurationColumn)"
echo The duration of %@pshell[$theFile] is %@pshell[$Duration]
endlocal

Code:
c:\users\jlc\utils>duration
The duration of Lana Del Rey - Love.mp4 is 00:04:54

Joe
 
Back
Top
[FOX] Ultimate Translator
Translate