Any good ideas for doing away with FOR and IF commands....

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
*SCRIPTER*
Posts: 18
Joined: 16 Mar 2009 08:18
Location: N/A
Contact:

Any good ideas for doing away with FOR and IF commands....

#1 Post by *SCRIPTER* » 18 Mar 2009 00:12

Just wondering if anyone has any good ideas for replacing "IF" and "FOR" commands in a batch script?

JustJoe
Posts: 6
Joined: 17 Mar 2009 12:54

#2 Post by JustJoe » 18 Mar 2009 10:06

Greetings:

The "FOR" could be done in a "Do....While" but not quite as efficiently. The "IF: is a pretty basic conditional statement. You could use unary operators but then your code is much less easy to read and understand.

cheers

*SCRIPTER*
Posts: 18
Joined: 16 Mar 2009 08:18
Location: N/A
Contact:

#3 Post by *SCRIPTER* » 18 Mar 2009 16:15

.....Yes this is my dilemma.
Was looking at maybe extending some sort of library
To house the statements and switch everything over
To vars in the initial script...
Any thougts on using the cmd command to pass the local
Environment Vars /V: on etc...
Setting up the local environment VIA the cmd commands
Then perhaps maybe use a macro
To set the statements inside the script environment.
? Maybe ?
TY for your post.

Post Reply