0

i currently have issues with output redirection of cmd.

I use "start" command to call another wayne.bat and want its output to be redirected. This works, but everytime i start my .bat (what happens daily), the "old" log file is discarded, so it will not append after restarting the .bat.

my command:

start /min wayne.bat run ^> logs\log.txt 2>&1

Works like intended. Now the mode "appending" is usually enabled by using ">>" instead of ">", so i tried:

start /min wayne.bat run ^>> logs\log.txt 2>&1

what causes the script to instantly stop without any error message, even if called over the shell. Without the escaping character "^" it doesn't work either.

So, how can i use the "start"-command to start a script and redirect its output in a appending manner?

0

You can call

start /min wayne.bat run ^>^> logs\log.txt 2>&1
  • 1
    head -> desk if i need to escape a single ">", i should escape the other one too -.- that is too obvious! Thanks for that! =] – Wutklumpen Oct 18 '13 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.