Support Portal

for ProcessRobot and WinAutomation

Start a new topic

Use 'Write to CMD' action to run multiple commands in one line

ADMIN

The following samples allow users to execute multiple commands using 'Write to CMD' action in various scenarios.  Open the attached .waj in your console to test these out.


Scenario 1 - Execute multiple commands using the '&' character

    

- dir abc.txt & echo OK


Scenario 2 - Execute second command when the first was successful using '&&'.


- dir abc.txt && echo File Exists


Scenario 3 - Execute second command when the first failed using '||'.


- dir hijkl.txt || echo File not found.


Scenario 4 - Combination - all of the above.


- abcdefg.txt %% echo File Exists || echo File not found.

waj

1 person likes this idea
Login or Signup to post a comment