Duration of a Media file

#1
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