0

Alright so excuse my lack of knowledge, just actually started learning about coding and am trying something out with a few programs.

I have an .exe and a .bat file that I want to string together so that I have one .bat file that I run. I would rather not edit the other bat files. The problem is the .exe file l poses two questions and creates a file.mesh. Now the first question's answer is always 0 so I'm wondering if there's a way to enter the 0 outside of the exe file, and the second is the name of a file which I want to keep as user input.

In addition to that, I want to take the name that I just put in in the second question to automatically run through a second batch file which creates another file...

So essentially what I want is to have the .bat open and ask for a name of a file, then run both the exe and the other .bat. can anyone give me some direction as to where I should start researching or could help me write?

4

2 回答 2

1

根据 EXE 文件的编写方式,这可能有效,也可能无效。试试看。

 >file.txt echo 0
>>file.txt echo filename.bin
exefile.exe <file.txt

或者

 >file.txt echo 0
>>file.txt echo filename.bin
type file.txt|exefile.exe
于 2013-07-21T03:18:26.670 回答
0

HelloWorld.bat 中的一行代码应为:

     Echo 0 ¦ foobar.exe
于 2016-02-01T16:25:43.650 回答