Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
108 user(s) are online (80 user(s) are browsing Forums)

Members: 1
Guests: 107

Skateman, more...

Headlines

Report message:*
 

Re: Looping in DOS batch scripts

Subject: Re: Looping in DOS batch scripts
by Raziel on 2021/5/23 12:54:45

@LiveForIt

Actually i've got it all figured out, the only thing missing is a way to give a variable with differing entries to the loop.

I know there is .KEY, but is there something like .KEY.1(.2,.3 etc.)
That way i could simply enhance a counter (e.g. i=i+1) during the loop and simply ask for .KEY.i.

...

I know arexx is far better suited for this (that's why most of the work is done by an arexx script already).
The problem is, that i need to be IN the directory when starting the arexx script, because arexx will only act on the directory it is started in, so i have to copy the rexx script to either directory and that is what i'd like to do in a batch loop.

Right now i mirrored four commands in the batch one after the other, each altering only in the path where the rexx script is copied to and started in.

There has to be a smarter way...

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project