-WHAT I NEED
How can I create a batch file that interprets external instructions (not batch code) and puts them in a variable?
-WHAT I GOT
A sourceforge project called "Easy-Series" (For easier debunking, here is the download link for every dependency as well as main file; Ignore crashing when you put external commands, will fix that later, but if you can fix it, Please mention it in the comments.)
-SOLUTIONS THAT I HAVE RULED OUT
set
doesnt seem to work because I think it only grabs the first line of a file encoded in plain text format... Am I right? If not then you can theorize a solution...
-EXAMPLES EXPLAINED THOROUGHLY
Say I have a text file named commands.txt
. I have a few EXTERNAL commands there to be INTERPRETED by an interpreter, of which I will code. I only need the "reading each line and put each line in separate variable" part. ONCE AGAIN, these commands are NOT batch commands, THESE ARE EXTERNAL COMMANDS which I need to be interpreted by an interpreter;
newfolder test
newfile test.txt
ping google.com
since I've already told you that this "Command Interpreter" called easycommandengine
(Which aims for easier use of windows command line) interprets external instructions, I want each line to be put in a seperate variable
line 1 = ecl_ecmdengine_line%linecount%
line 2 = ecl_ecmdengine_line%linecount%
line 3 = ecl_ecmdengine_line%linecount%
line 4 = ecl_ecmdengine_line%linecount%
and so on and so forth
WHAT I MEAN BY THIS is THAT, say, LINE 1 of commands.txt
which is newfolder test
to be saved in variable "ecl_ecmdengine_line1"... 1 would be the %linecount%
variable.
If you STILL don't understand (tl;dr?): I technically mean that I want a batch file to read .txt files with instructions the same way cmd
reads batch files...
I'd also like the code to make %linecount% variable (which I suppose is already self-explanatory) work... I'm too newby to make for
commands which just makes my mind blow up...
-NOTES
Once again, HERE are the files if you want to test my code out on your computer yourself...
If you think I have given too much or too few information, PM or Comment on this post, and I will try and fix it as soon as I can.