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?

1
  • Is your EXE a cli program? If not, look at AutoIt. Commented Jul 20, 2013 at 20:28

2 Answers 2

1

Depending on how the EXE file is written, this may or may not work. Try it and see.

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

or

 >file.txt echo 0 >>file.txt echo filename.bin type file.txt|exefile.exe 
Sign up to request clarification or add additional context in comments.

Comments

0

Simply a line in HelloWorld.bat should read:

 Echo 0 ¦ foobar.exe 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.