Search found 1 match

by hm1957
30 Jan 2022 18:32
Forum: DOS Batch Forum
Topic: goto-jump destroys for-vars/loop
Replies: 1
Views: 3956

goto-jump destroys for-vars/loop

@echo off set List=A B C for %%L in (%List%) do ( echo outerL=%%L for %%T in (%%L) do ( echo T > t.log :Testloop echo innerL=%%L if exist t.log ( del t.log goto :Testloop ) ) ) Saved the code as Test.cmd p:\> Test.cmd outerL=A innerL=A innerL=%L p:\> Solved the real problem by using a recursive pro...