Is there a way to force Opus to run the program synchronously, ie. wait after each file for command completion? Currently md5sum is run at the same time multiple times (once for each selected file), which is obviously a bad idea.
I got md5sum from here and tried it in an MS-DOS button. Seems to work fine.
Are you running it on filenames with non-Latin characters? They could complicate things, perhaps.
Have a dig in your temp folder and see if you can find the .bat file Opus is generating for the button. (It should stay around for a minute or two after the button is run before Opus cleans it up.)
Try adding one of these lines to the top of the button's command:
@codepage 850
Or
@codepage 1250
Or open a command prompt and type chcp on its own to see what your machine's default codepage for DOS is.
I still can't reproduce the problem on my machine, even when using 1250, but it could be something that's fixed in Windows after XP, or maybe I've got a different version of md5sum.exe.
The DOS codepage does define which codepage is used to redirect program output into text files, so it's certainly involved here, but I can't think of any (sane) reason why it would result in a large amount of garbage being inserted into the file. That seems like a bug somewhere, and not in Opus since you've seen it happen when just running the .bat file. Strange!
Adding @codepage 852 (my default cp) solved the problem.
It must be some OS language-specific problem.
Anyway, default codepage written in DO batch could be the system's default cp, not the 1250 one.
It does use the system's default codepage; and since 1250 is ANSI Central European; Central European (Windows) this would seem to be correct for Poland?
It uses the codepage of the dopus.exe process but for some reason that seems different from the codepage used by default in a command prompt (1252 vs 850 for me and 1250 vs 852 for Xyzzy).
Not sure what the 'right' thing to do is, though. Aside from this issue (which is surely a bug in something other than Opus), using a codepage consistent with dopus.exe means the filenames it puts in the .bat file are more likely to work correctly without translation issues, I would've thought. I don't understand why the command prompt and UI programs are getting different codepages though... Perhaps there's a reason.
That pages makes sense, but I think it reinforces what Opus is doing.
If batch scripts were left using the the default DOS/OEM codepage then their output would not look correct in GUI tools (e.g. notepad, like in the examples on the page).
Are you using the same version of md5sum.exe? I just tried it on XP SP3, with chcp 1252, and a .bat file that ran it against two files, and it worked okay.