I have roughly the following script:
# Those are actually passed as cmdlet parameters into the script
$FFmpegPath = "ffmpeg"
$Args = "-i MyInput.mp4 MyOutput.webm"
& $FFmpegPath $Args
The ShellExecute
that I expect this to perform is ffmpeg -i MyInput.mp4 MyOutput.webm
. FFmpeg, however, complains that it can't properly parse the arguments, and upon further inspection using Process Hacker, it turns out that the actual command line that PowerShell is executing is ffmpeg "-i MyInput.mp4 MyOutput.webm"
.
How do I get rid of those quotation marks and pass the whole string as one or more individual arguments with the usual argument separator syntax (spaces separate arguments, internal escaped quotations stay as quotes and prevent spaces from becoming delimiters, etc)?