Displaying progress report

I have some external command that operates on a file. I run it from DO's button on large number of files (the command is executed multiple times, once for each file).

Is there a way to display in DO progress of execution of such button?

That usually happens automatically, at least if you use {filepath} or similar to cause the program to be run once per file.

What's the actual button?

It just does its job, but I'd like to have fe. some mini dialog with progress bar updated after every file.

<?xml version="1.0"?> <button backcol="none" display="label" textcol="none"> <label>Twórz sumy MD5</label> <icon1>#newcommand</icon1> <function type="batch"> <instruction>@codepage 852</instruction> <instruction>@runmode hide</instruction> <instruction>@sync:C:\Programy\md5sum\md5sum.exe {file$} &gt; {file$|noext}.md5</instruction> </function> </button>

"DOS Batch Function" commands don't get a progress dialog (I guess since Opus usually turns them into a batch file which then runs by itself).

That's no problem, though. You can turn the command into a "Standard Function (Opus or external)" one, and run md5sum.exe via cmd.exe (the command prompt), like this:

@nofilenamequoting @runmode hide @sync:cmd.exe /S /C ""C:\Programy\md5sum\md5sum.exe" "{filepath$}" > "{filepath$|noext}.md5""

The only reason for running the program via cmd.exe is that we want to redirect its output to a file, which is a feature of the command prompt. If we weren't doing that then we could run md5sum.exe directly.

Only other thing to mention is the way the command line had to be surrounded in an extra pair of quotes. cmd.exe will strip off quotes if they exist at the start and end of the line you feed it, or if the /S arg is used. I've added the quotes and used the /S argument to ensure cmd.exe always behaves in a predictable way.)

Here's the full button in XML form:

<?xml version="1.0"?> <button backcol="none" display="label" textcol="none"> <label>Twórz sumy MD5</label> <icon1>#newcommand</icon1> <function type="normal"> <instruction>@nofilenamequoting</instruction> <instruction>@runmode hide</instruction> <instruction>@sync:cmd.exe /S /C &quot;&quot;C:\Programy\md5sum\md5sum.exe&quot; &quot;{filepath$}&quot; &gt; &quot;{filepath$|noext}.md5&quot;&quot;</instruction> </function> </button>

Thanks.

Here is output (file contents) from the old command:

934139b4f35bc969a6b416229c9a9bb3 *WHDLoad_usr.lha

and from the new:

\934139b4f35bc969a6b416229c9a9bb3 *E:\\Emulacja\\Amiga\\WHDLoad_usr.lha

Any ideas why they differ (note also backlash at the beginning of the new output)?

Try changing the two filepath in my command back to file like in your original.

Works perfectly now.

Thanks again.