Sunday 15 June 2014

Batch-Run FOR loop through cases. -


I have the case which sets the variable, this case is chosen based on user input. When the case is executed, the variable is sent to the one: RUN label, where they are pushed through some code.

What do I want to do: When a user enters "ALL" for input, each goes to the loop which runs through each case: RUN label. I'm not sure whether you can design four loops to go in all cases. I'm totally open to suggestions.

Thanks

 SET / P Process = "Choose a process to run:" 

2> Call the NUL: Jump to% PROCESS% #: CASES If the error 3 calls: all # if the label does not exist, ECHO has gone exit / b: PROCESS1 set runProcess1A = yes runProcess1A = yes runProcess1B = not set runProcess1C = set yes Goto run: PROCESS2 Run runProcess2A = Yes set runProcess2B = yes set runProcess2C = Yes Goto Run: run PROCESS3 set runProcess3A = Yes runProcess3B = not set runProcess3C = Not set Goto set: All RAM codes need to run through all cases (process 2 PROCESS2 and PROCESS3). : RAN rim if process 1a == yes, ETC

postprice itemprop = "text"> Do something.

This is what you want to do

  Rem believe that a number between input 1 and 3, or the word will be fully prepared / p process = "a process to run Select: ". SET P1 = Yes No Yes SET P2 = Yes Yes Yes SET P3 = Yes No If not, "% Process%" == "All" (%% for Z IN (1 2 3) / F "TOKENS = 1-3 "%% (! P% Process%!) In %% (set runProcess% Z% A = %% run of groupProcess% Z% B = %% b set runProcess% Z% C = %% C) and ( (%!% P% Process%!) For% / F in 'TOKENS = 1-3'% (set runProcess% Process% A% = %% Run of Process% Process% B = %% B RunProcess% Process% C =%% C)): Run ...  

No comments:

Post a Comment