Thanks Leo!
This question is really an extension of what I had been asking for earlier, regarding a button for running WSL in ConEmu. With the somewhat convoluted way ConEmu starts its associated shells, the best path to achieve what I wanted seems to be to define an environment variable that holds the directory I want the bash shell to start in. This is defined system-wide as "~" (my home folder under WSL) so that everything works as before when I simply start ConEmu from its regular shortcut. In order to launch the shell in a specific source folder, all I then need to do is redefine this environment variable to point to the WSL version of the source path.
Like I said, I do have a DOS batch script that does exactly that and works fine. Thus I can just define a button for DOpus which starts that script and I'm set.
So this question really seeks to eliminate the need for a separate .bat file, by inserting the entire code in that script into the definition of a DOpus button.
Unfortunately, running DOS commands within DOpus' environment seems to somehow work differently, and I narrowed the issue down to the fact that it seems we cannot change environment variables from within DOpus. This is somewhat strange, and I don't really understand the reason why this would be, but here we are…
Nevertheless, I would still be interested in any more elegant solutions for what I am doing.
P.S.: Oh, and I do agree that DOS scripts typically represent a somewhat ugly solution.