Execute Command - Working With Returned Data

Post Reply
savvykong
Newbie
Posts: 2
Joined: Fri Apr 05, 2024 8:22 pm

Execute Command - Working With Returned Data

Post 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!
mkayyyy
Member
Posts: 82
Joined: Mon Nov 21, 2016 6:31 pm
Location: UK

Re: Execute Command - Working With Returned Data

Post 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.
savvykong
Newbie
Posts: 2
Joined: Fri Apr 05, 2024 8:22 pm

Re: Execute Command - Working With Returned Data

Post by savvykong »

This worked nicely, thank you for the recommendation!
Post Reply