0
echo off
echo .
echo .
echo .
start /wait cmd.exe /c omake mv=%~2 ecu_build > ecu_log.txt 

Please help me how to log the cmd window output the above code is not working It always creates an empty file {ecu_log.txt}

Gerhard
  • 22,678
  • 7
  • 27
  • 43
Krishna Matsa
  • 23
  • 1
  • 6
  • The above lines are written inside a .bat script which is called from a make file – Krishna Matsa May 11 '21 at 15:42
  • 3
    you are missing some double quotes, else the redirect is passed to catch the output of the first `cmd` instance which is nothing `start /wait cmd.exe /c "omake mv=%~2 ecu_build>ecu_log.txt"` but anyway, how about just `omake mv=%~2 ecu_build>ecu_log.txt 2>&1` – Gerhard May 11 '21 at 16:36
  • Thank you for the quick reply. It is working and logging the cmd output but i observe below errors::: Error: Multiple versions of "\frdcc_motorcontrol\project\asm_bk\output\EVD2\quicktest\quicktest_ecu_log.txt" were accessed during build script. Interference from another process? – Krishna Matsa May 12 '21 at 02:56
  • start /wait cmd.exe /c "omake mv=%~2 ecu_build>ecu_log.txt" – Krishna Matsa May 12 '21 at 08:19
  • The first option chosen but even if i tried the second options but the errors were coming – Krishna Matsa May 12 '21 at 13:33
  • ok, so that error is coming from your build, not the way you are running the redirect. – Gerhard May 12 '21 at 13:50

0 Answers0