Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Help-what does "2>&1" mean?  (Read 4809 times)

0 Members and 1 Guest are viewing this topic.

wyq

  • Guest
Help-what does "2>&1" mean?
« on: January 05, 2005, 04:59:07 AM »
Hey,I am now working on a wince project. I often encounter "2>&1" in batch file.
It often looks like this:
@REM // cleanup error log file and set local env
if not "%___BATCHMODE%"=="" goto endif_25
   setlocal
   del %_WINCEROOT%\build.err > nul 2>&1
   del %_WINCEROOT%\build.log > nul 2>&1
   del %_WINCEROOT%\build.wrn > nul 2>&1
:endif_25

I know:
2>:redirects error output of a program to a file.
&:separates two or more commands executed sequentially.

But I do not know what does "2>&1" mean?
Please help!
Thanks in advance.

Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: Help-what does "2>&1" mean?
« Reply #1 on: January 06, 2005, 01:03:19 AM »
Looks like an instruction in OS/2 and NT to route standard output & command error to a file (in this case the file NUL) - see here

http://www.robvanderwoude.com/index.html

Sorry I can't be of more help but the website is pretty clear.

Good luck
One good deed is worth more than a year of good intentions.