|
Answer» Hello, I have a certain little command-shell program (I will call it "myPROG.exe"). This program reads an existing text file ("INPUTFILE.txt") that has a bunch of commands ... myPROG.exe follows those commands, and then spits out an output file (I will call it "LOG.txt").
This is what I type at the DOS-like 'command prompt' supplied with my copy of Win7, 64bit: C:\ myPROG.exe INPUTFILE_1.txt > LOG_1.txt When the program is done working (**SEE below), I have to run it again: this time with a new input file ("INPUTFILE_2.txt") with a new. So, I would type: C:\ myPROG.exe INPUTFILE_2.txt > LOG_2.txt Then a third... C:\ myPROG.exe INPUTFILE_3.txt > LOG_3.txt
This process is repeated with up to 10 input files.
Is there any way to automate this process? Also, if you can tell me how to do it using Linux terminal (using the linux VERSION of this program), that would be great too.
THANK YOU!!! -BH
P.S. -- If this is at all relevant: I know JAVA .
**I know the program is done when I open "LOG.txt" and I look at the last line of that text file -- it should SAY "--complete--" (Actually, there is another way to tell that the program is working -- After I initially tell the program to run, I can't type at the command prompt, but once it is done, I am able to type at the command prompt again).
Quote from: bhill4 on February 08, 2011, 07:13:14 PM Hello, I have a certain little command-shell program (I will call it "myPROG.exe"). This program reads an existing text file ("INPUTFILE.txt") that has a bunch of commands ... myPROG.exe follows those commands, and then spits out an output file (I will call it "LOG.txt").
I hate these "hide the truth" type threads. Why do people do this? Coyly mention a "certain little program" which they "will call Myprog.exe". What's wrong with saying what it is really CALLED? Is it a dirty little secret?
I believe this thread starter may be Billrich. Just in case it isn't, the answer is, put the consecutive command lines in a text file and save it with a .bat or .CMD extension. For Linux use .sh
|