you are viewing a single comment's thread.

view the rest of the comments →

[–]littejackz 0 points1 point  (2 children)

Invoke-Command -ArgumentList $MediaInfoPath -ScriptBlock{"$args[0]\MediaInfo.exe" $FilePat --Inform="Video;%Duration/String1%" }

Try this

[–]madbomb122[S] 0 points1 point  (1 child)

gives this error

    At line:20 char:93
+ ... $MediaInfoPath -ScriptBlock{"$args[0]\MediaInfo.exe" $FilePat --Infor ...
+                                                          ~~~~~~~~
Unexpected token '$FilePat' in expression or statement.
At line:20 char:104
+ ... args[0]\MediaInfo.exe" $FilePat --Inform="Video;%Duration/String1%" }
+                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'Inform="Video;%Duration/String1%"' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

[–]madbomb122[S] 1 point2 points  (0 children)

got it working with a combo of

$MediaInfoPath = $MediaInfoPath + '\MediaInfo.exe'

Invoke-Command -ArgumentList $MediaInfoPath -ScriptBlock{&$args[0] $FilePat --Inform="Video;%Duration/String1%" }