3
1
Im trying to find a command or a script that can do commands from a specified .txt file. e.g it would treat a .txt file as a batch file but not necessarily rename it to .bat.
Can anyone help?
e.g:
cmd "filename.txt"
do cmd
That would run filename.txt as a .bat file and do any commands in it.
@PimpJuiceIT Im looking for it to execute Line-By-Line as an individual command. Is there some sort of .exe utility for it? – ZeekPlayz – 2018-06-16T04:48:48.877
@PimpJuiceIT Is it a EXE utility? – ZeekPlayz – 2018-06-16T05:02:12.330
Okay, I just added another batch script solution as a separate answer that will process each line from the text command file one by one. I tested it extensively and this is the best way I was able to get the logic to work as expected so that should do what you ask so try it out; no need for an executable to do this from what I tested. – Pimp Juice IT – 2018-06-16T05:57:22.247
4
there are quite a lot of duplicates on SO: Running a non bat extension file as a batch file, How to DIRECTLY execute command in txt file in cmd?, Windows batch file that reads commands from txt file, how do i get a batch file to accept input from a txt file?, Execute Commands from Any Text File (Not Having “.bat” or “.cmd” Extensions)
– phuclv – 2018-06-16T08:33:48.890What's up Zeek? Did you get a chance to look over any of the answers provided to this question by chance? I added the one with the title of Run Individual Lines from a Text File as Batch Commands so I wasn't sure if you gave that a simple run yet or not?? – Pimp Juice IT – 2018-06-20T00:29:40.940