View Full Version : Redirecting (BatchFile) System Responses in Windows Mode

05-11-2012, 02:12 PM
I'm using Windows 7 & I have a batch file.

delete abcd.txt
md jpg-folder
copy efgh.jpt jpg-folder

In CMD mode, if I enter TESTCOPY.BAT >ABC.TXT 2>&1 the commands and system responses (such as "subdirectory or file JPEG already exists", "file not found") are sent to the ABC.TXT file.

In "Windows mode", if I double click on the TESTCOPY.BAT file icon the commands are executed, but the system responses are "lost".

Is there a way, in "Windows mode", to capture the system responses?

05-11-2012, 04:31 PM

I've found something in the net and hope it works. You may try TESTCOPY.BAT >ABC.TXT 2<&1 in command mode.


05-11-2012, 05:47 PM
Thanks, Newbie.

That's what I've been doing. I'm now passing the task off to someone who is completely unfamiliar with bat files, cmd mode, etc. I want to avoid their having to switch to cmd mode. He/she needs instructions no more complicated than "Double click on TESTCOPY.BAT".

After further thought, My best solution is to add a PAUSE as the last command in the .BAT file. Now after double clicking on TESTCOPY.BAT, the CMD window will remain open for review, instead of disappearing in a flash.

I had hoped to stay in Windows mode, yet still be able to capture the results in a .TXT file.


05-12-2012, 02:23 PM
O.K. I See