windows - How to redirect output to a file in a batch file? -
in windows 7, have batch file runs exe in sub-directory of bat file, first changes current directory folder, runs exe. goes wrong, see console window short time , program doesn't start. since output console displayed less second, can't see error message.
bat file is:
cd /d "%~dp0my_subfolder" start "" myapplication.exe how redirect output error message text file (the text file in same directory bat file), can read error message? command should add bat file above?
use:
start "" myapplication.exe > mytextfile.txt 2>&1 instead run batch file cmd know error
Comments
Post a Comment