Page 1 of 1

Execute Command - Working With Returned Data

Posted: Wed May 08, 2024 7:43 pm
by savvykong
Hello All,

What would be the best way, if possible, to retrieve direct output (output stream?) from a command line operation? Just for example, I run the dir command to capture the total number of files in a directory. I currently have a batch script setup that will redirect the output value to a text file where I could retrieve it and then work it but Is there a way I could go directly to a Private Data Key with it somehow? No scripting here, just the core engine only. Maybe utilizing the "Attach as dataset" feature of Stdout that I haven't played around with yet, I'm not sure, as that seems to output to a text file as well according to the doc. If the output text file is the only way, how could I get the contents of that text file into a Private Data Key? Thank you!

Re: Execute Command - Working With Returned Data

Posted: Thu May 09, 2024 8:45 am
by mkayyyy
I'd recommend trying the Run command app (https://www.enfocus.com/en/appstore/product/run-command) which has flow element properties which allow you to define Private data keys where the Standard output, Error output and Exit code will be written.

Re: Execute Command - Working With Returned Data

Posted: Thu May 09, 2024 7:50 pm
by savvykong
This worked nicely, thank you for the recommendation!