interprocess communication is a BIG topic, in my experience the simplest, most reliable way to send data between processes is to use named pipes. I would suggest you look that up.
however if you just want two programs to run sequentially after each other you could just pipe the output from the first program to other by writing
C:\>myprog1 > myprog2
then the output from myprog1 will be input in myprog2