Hopefully "ScriptingTipsAndTricks" helps you with your batch file or vbscript scripting :-)
[Bottom][Contents][Prev]: Return Codes (ERRORLEVEL)[Next]: Special or Difficult Characters
\->Introduction->Transfering (PIPING) Data Between Programs

Transfering (PIPING) Data Between Programs

What a pipe allows you to do is connect STDOUT and/or STDERR streams from one program into STDIN of another.

First of all what are these streams?:

The "|" (vertical bar) special character is used to perform the piping as demonstrated here:

type SomeFile.txt 2>&1 | sort.exe > SortedContents.txt

When the input is a file (not process output) you can also use redirection as demonstrated here (the example about shows the "TYPE" command being used):

sort.exe < SomeFile.txt > SortedContents.txt 2>&1


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Return Codes (ERRORLEVEL)[Next]: Special or Difficult Characters


ScriptingTipsAndTricks© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday September 07 2014 at 12:50pm
Visit ScriptingTipsAndTricks's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.