Steve Posted April 3, 2021 Report Share Posted April 3, 2021 Is there a way to capture DOS command output (normally done with a redirect >>) when using Program Launch? Quote Link to comment Share on other sites More sharing options...
rberq Posted April 3, 2021 Report Share Posted April 3, 2021 The only way I have found is to redirect the output to a text file, then read back the text file with the macro script (Text File Begin Process). 1 Quote Link to comment Share on other sites More sharing options...
Samrae Posted April 5, 2021 Report Share Posted April 5, 2021 This worked for me: The /c parameter tells cmd.exe to close after running. %TEMP% points to the temporary folder. You could also put commands in a batch file c: cd %TEMP% dir > %TEMP%\DirCmd.txt and use the Program Launch command to run the batch file. And then, as rberg said, load the file into a macro via a 'Variable Set String %T1% from File' command or the Text File Begin process command. 1 Quote Link to comment Share on other sites More sharing options...
Steve Posted April 7, 2021 Author Report Share Posted April 7, 2021 Thanks. That (the first option) worked for me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.