Capture output from dos app

Started by stevengraff, July 24, 2014, 08:46:51 AM

Previous topic - Next topic

stevengraff

It seems that runShell and ShellExecute just return boolean success/failure results... is there some way I can capture the output of a dos app?

I have a program called md5sum.exe which accepts a parameter (a file name), and it outputs a text string. I could direct its output to a file if need be, but hoping to skip that intermediate step.


snowsnowsnow

Search the tech db for:

W17213

There are others, but that's my personal favoriteââ,¬Â¦

stevengraff

I like it!

But is there any way to make the dos app run completely silently, in the background? @Hidden and @icon don't entirely seem to work like I'd hope.

Deana

Quote from: stevengraff on July 24, 2014, 09:29:42 AM
I like it!

But is there any way to make the dos app run completely silently, in the background? @Hidden and @icon don't entirely seem to work like I'd hope.

Unfortunately no not completely hidden. No way yet known to hide the DOS window from appearing on the screen except to perhaps have a "Keep on top" cover screen (i.e. BoxesUp and other box functions + IntControl(54,1,0,0,0)
Deana F.
Technical Support
Wilson WindowWare Inc.

....IFICantBYTE

Looking at your original needs from a different angle... if the DOS app you are running is returning an MD5 string of the filename you pass to it, then perhaps you can use the WB command:
FileDigest("path\filename.xxx","MD5",0)

instead of using the DOS exe at all?

Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)

seckner

On the WB Tech support web site, under extenders, 3rd party extenders is one called Dos Capture Extender - I've used it with great success in capturing DOS output silently.  Hope this helps.

stevengraff

Quote from: ....IFICantBYTE on July 24, 2014, 05:04:24 PM
Looking at your original needs from a different angle... if the DOS app you are running is returning an MD5 string of the filename you pass to it, then perhaps you can use the WB command:
FileDigest("path\filename.xxx","MD5",0)

instead of using the DOS exe at all?

Thanks... FileDigest completely solves my problem.

stevengraff

Quote from: seckner on July 24, 2014, 06:36:11 PM
On the WB Tech support web site, under extenders, 3rd party extenders is one called Dos Capture Extender - I've used it with great success in capturing DOS output silently.  Hope this helps.

Thanks, just tried it... works like magic; what a gem!

snowsnowsnow

FWIW, I can't find any "FileDigest" function in my docs.

Just out of curiosity, is "FileDigest" a new command [\*] or is it in some extender? [\**]

[\*] By "new", I mean "post 2006".
(heh heh - like in the C world, by "new", they often mean "C99" - 15 years ago)

[\**] There was some extender at one point (RC something or something like that) that computed these checksums, right?

td

FileDigest was add to the WIL language with version 2007C  which was released  April 26, 2007.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

snowsnowsnow

Quote from: td on July 25, 2014, 08:05:48 AM
FileDigest was add to the WIL language with version 2007C  which was released  April 26, 2007.

Thanks.