I am open to correction, but I believe that >
would not be a part of the command line passed to notepad, but rather would be passed to your shell (cmd.exe, cygwin's sh, whatever).
Also I don't think that notepad.exe actually outputs anything to the console under usual circumstances, being a completely GUI application.
I do not believe cmd.exe supports 2>&1
style redirects (apparently it does, see here
, thanks for the headsup
), so you would have to be using cygwin's sh or perhaps SUA perl. In that case, why aren't you just using system