I tried out of curiosity:
where "foo" is foobar path and "args" are /tag:<command> <file> which works fine from command line
then foobar throws this:
unknown commandline parameter: -
and enqueues <file> as set in "shell integration"
running process monitor shows that new foobar process ID is created with path string to foobar path and this command line string for all operations:
/tag:comment="Some comment" "some file"
I guess that this is completely wrong way but that "unknown parameter" is saying something and I would like to know if it's there some way to tag multiple files without launching command line all the time?