Under Windows 10 Enterprise LTSC, I have a simple CMD ff.bat which contains:
powershell -Command (Measure-Command {ffmpeg.exe -hide_banner -i %* E:\%~n1.mkv}).ToString
In CMD> ff test.mp4
and ff "test.mp4"
works but NOT
ff "E:\Serie.(2009).8x04.episode.FR.LD.WEBRip.x264-LiBERTY.[server.org.ru].mkv"
Given PowerShell error is:
Au caractère Ligne:1 : 60 + (Measure-Command {ffmpeg.exe -hide_banner -i Serie.(2009).8x04.episode.FR.LD.WEBRip.x264-LiBERTY.[server.org.ru].mkv ... +
~ Nom de propriété manquant après l’opérateur de référence. (Missing property after reference operator) Au caractère Ligne:1 : 144 + ... .FR.LD.WEBRip.x264-LiBERTY.[server.org.ru].mp4 E:\Serie ... + ~ Nom de propriété manquant après l’opérateur de référence. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : MissingPropertyName
I guess the problem comes from the .-[]():\
and brackets and parenthesis characters found in the file name.
Could you give me the proper syntax for this to work in CMD, please.
As a bonus, you can give me the syntax to make it work in PS if it can.
Please note I'm a complete newbie in PowerShell and need examples more than suggestions.
Thanks in advance, Marc.