I have a command which I saved in the variable $command, something like this
$command = path\to\.exe
The $command has a parameter -f which represents the path to the file. This parameter can be repeated multiple times in the same line to execute the command on multiple files without having to reload the necessary models every time the command is executed on each file.
Example:
If I have 3 files I need the run the command on, then I can execute it like this:
& $command -f 'file1' -f 'file2' -f 'file3' -other_params
I want to know if there is any way to do this in PowerShell if I have 100 files since I can't obviously try to pass in 100 parameters manually.