一个批处理问题:a.bat
在批处理中要调用一个可执行程序, Test.exe
执行Test.exe时,要输入一个参数 100,执行Test后,会返回一个字符串,得到返回的字符串后作为一个参数调用另一个可执行程序TestTwo.exe。这个批处理文件如何写?

解决方案 »

  1.   

    Test.exe 100 > 1.txt
    TestTwo.exe < 1.txt
      

  2.   

    可不可以 不把执行Test得到的字符串输出到文件???
      

  3.   

    在C#下如何实现下面C语言写的程序?将前一个设备的标准输出定向到后一个设备的标准输入,例如程序如下:///////////////
    ////test.c/////
    ///////////////
    #include <stdio.h>int main(void)
    {
    printf("%s", Y.Jing);
    return 0;
    }
    ///////////////
    ////test2.c/////
    ///////////////
    #include <stdio.h>int main(void)
    {
    char buf[1024];
    scanf("%s", buf);
    printf("i get the string %s\n", buf);
    return 0;
    }
    C:\>test.exe | test2.exe
    i get the string Y.Jing
      

  4.   

    楼主的第一个问题的答案:
    TestTwo.exe | Test.exe 100
      

  5.   

    应该是 Test.exe 100 | TestTwo.exe 
      

  6.   

    Console.WriteLine()
    Console.ReadLine()
      

  7.   

    to linuxyf(率人) 
    右边的是输入。不是放在左边。