I have an old Windows machine I need to automate something on, bash and powershell aren't available to me, and I'm not sure how to do what I'm trying to do with only batch scripting available.
essentially, I'd like to have somewhere, in the batch file, in a text file, wherever
I know, I've just been asked to "not install anything" unless I absolutely have to.
Adrian Wilson
Just kill that NT4 box
Levi King
This is a stupid idea. You don't understand CMD, aren't really a hot shit programmer. You'll probably wreck shit if you use it.
Install bash & play it safe.
Jacob Lopez
Yeah I've looked at this, but have no idea where to even start, I haven't touched batch in around 20 years.
I'm probably going to just use Windows task scheduler to make a different machine on the network (that has Cygwin) generate a crappy batch file using the...
It has to do with DNR reporting at the water department.
Jeremiah Cruz
Haven't used cmd once but maybe you can try this by putting each arg on new line on list.txt. for /f "tokens=*" %%a in (list.txt) do @command %%a staticarg anotherstaticarg
Isaac Allen
I'm a batch programmer so I think I can help, but you are going to have to give me more to work with because I don't understand what you are trying to achieve here.
Explain in baby steps exactly what you want this script to do and I will post you the code to do it.
Daniel Morgan
>%i is to be used from the command line while %%i is to be used from a batch Who thought of this?
Kayden Adams
fixedtext $variabletext fixedtext fixedtext
I'm going to be executing the same command multiple times.
Argument 2 and argument 3 will always be the same.
Argument 1 is dymanic, I'd like to retrieve it from somewhere, I don't care where.
Hunter James
...
Jackson Adams
This worked for what I want to do, thanks.
Luke Jones
You install a GNU/Linux distro on it so that """old'''''' computer will feel as new again. The you google how bash works and solve your problem in 1 minute.
Ayden Price
for /f "delims=" %%X in ('args.txt') do (command %%X staticarg anotherstaticarg)
Hudson Peterson
I'm using gov. provided software on a server I don't own. Said software only runs on Win2k Adv. Server
I already know how bash works :-)
Jeremiah Myers
best of luck, user!
Benjamin Lewis
OP if possible, you can run a somewhat limited bash via busybox for windows frippery.org/busybox/
The bash is kinda old, but it beats scripting with Batch.
Jacob Jones
I've already finished what I was trying to accomplish, this did what I needed.
Dylan Rivera
Irrelevant to OP's question, do you know a batch interpreter that can be run on Linux?
Carson Nguyen
Download busybox.exe and do it in the busybox shell. It's under a megabyte.
$ wine cmd
Samuel Martin
Don't question it it's microsoft, probablly some weird compatibility issue.