It turns out that if you use .cmd instead of .bat as the extension for your batch file, and run it from an MS-DOS Batch Mode button in Opus, then nothing will run after the first .cmd, unless you run it via the "call" command.
So either rename it to test.bat or use "call C:\test.cmd {filepath}" to run it if you want to keep it as .cmd for some reason.
The call command is needed because, to cut a long story short, MS-DOS is poorly designed and arcane. Opus automatically inserts the call command before .bat files in this situation but not before the rarely-used .cmd files.