如何通过输入批处理文件.EXE? [英] how to pass input to .exe in batch file?

查看:97
本文介绍了如何通过输入批处理文件.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆