# Standard error redirection in backquote notation

**URL:** <https://www.ruby-forum.com/t/standard-error-redirection-in-backquote-notation/161347>\
**Category:** Ruby\
**Created:** [February 25, 2009, 6:27pm UTC](https://www.ruby-forum.com/t/standard-error-redirection-in-backquote-notation/161347 "2009-02-25T18:27:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Lambert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/fbc32d/32.png) [@Vincent\_Lambert](https://www.ruby-forum.com/u/Vincent_Lambert)\
**Post date:** [February 25, 2009, 6:27pm UTC](https://www.ruby-forum.com/t/standard-error-redirection-in-backquote-notation/161347/1 "2009-02-25T18:27:48Z")

</div>

Hello,

We want to capture all the output of an external program that we call  
from ruby. We use a custom function that sends the command to the system  
using the backquote notation. 2\>&1 is appended at the end of the command  
line to capture the standard error (which is very important to us). When  
we add 2\>&1, we get the following error messages : ‘c:\Program’ is not  
recognized as an internal or external command. Note that we get this  
error even when the command is surrounded by quotes.

Do you have any idea how to get around this problem ?  
We are using Windows XP.

Any help would be greatly appreciated.
