如何在批处理文件中将输入传递给.exe? [英] how to pass input to .exe in batch file?
本文介绍了如何在批处理文件中将输入传递给.exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个需要 3 个整数作为输入的 .exe.例如:
I have a .exe which requires 3 integers as input. For example:
myCode.exe < input.txt
在 input.txt 中:
In input.txt:
2
3
8
现在我想把命令放在一个批处理文件中.如何编写批处理文件?(这里我想在批处理文件中传递3个固定整数)
Now I want to put the command in a batch file. how can I write the batch file? (Here I want to pass 3 fixed integers in the batch file)
谢谢!
推荐答案
这也可能有效:
(
echo 2
echo 3
echo 8
) | mycode.exe
这篇关于如何在批处理文件中将输入传递给.exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文