Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
110 user(s) are online (88 user(s) are browsing Forums)

Members: 1
Guests: 109

ddni, more...

Headlines

Report message:*
 

Looping in DOS batch scripts

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

Hey,

a question to all the DOS batch experts.

I'd like to create a looping batch script that does slightly different things (but effectively the same), but to different targets.
I know how to do it in rexx, but i'm not firm enough to pull it off in .bat.

Here's what i like to achieve (i have the loop figured out, but i don't know how to set up the target(s), so that the loop will read them one by one.

target="path1""path2""path3""end"

LAB Main
if target EQ "end"
    
QUIT
endif
if 
target EQ "path1"
    
do stuff
endif
else
    do 
other stuff
endif
SKIP BACK Main

Any help appreciated, thank you very much

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project