cmd.exe stderr redirection does not work as expected
Posted on 2006-03-24
The redirection operators of cmd.exe (Windows XP) does not seem to work.
Given 2 files a.txt and b.txt, where b.txt is set to read-only.
Then try this
C:\>type a.txt >b.txt 2>a.err
Access is denied.
The error message should have been in the file a.err, but it comes in the command prompt window.
Whats wrong here.
I have looked for answers using Google "windows cmd.exe redirection error"
Found MS KB264824, but I don't think that's it. (My PC is running Win XP Pro. SP2)