Store arguments of a command in variable

29 views Asked by At

I am trying to store the arguments of a command in a string instead of calling the function directly with the parameters but it seems that Powershell is not handling the string properly

ffmpeg -v quiet -stats ...  # works

$var = "-v quiet -stats"

ffmpeg $var ... #does not work

I get:

Unrecognized option 'v quiet'. Error splitting the argument list: Option not found

What is the correct way to handle this?

Thanks

0

There are 0 answers