Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Redirect output in Batch Command #2558

mbbb ·
Hi,

When I'm trying to run command with redirect sign to file e.g. dir > t.txt, the step is fails, but if there is other command a line before e.g.

whoami
dir > t.txt
, it does works.
Also, the following script don't create file.
util.execute("cmd /c dir > rr.txt")

Can you please explain that ?

Thanks
  • replies 3
  • views 1911
  • stars 0
robinshen ADMIN ·
For a single line of command, QB executes it directly without using shell, which will cause error for redirect sign as it is interpretated by shell. However in case of multiple lines being used, QB internally creates a batch file to run these commands, and this batch file will be interpretated by shell.
We can check if we can use batch file even for single line command, so please go ahead to file an improvement request at track.pmease.com.
Productivity ·
Hello,

since mbbb did not reply and I could not find an improvement request on Jira, I took the liberty to create the issue on his behalf. I think it is a big issue that the behavior between a single-line command and a multiple line command can be different since everyone would expect (and rightfully so) that a command should be interpreted by the console/terminal.

You can find it here: http://track.pmease.com/browse/QB-1824
robinshen ADMIN ·
Thanks form creating this, will take care of this in next release.