Fixed Slow FOR loop

Jul 21, 2012
32
0
Not sure why, but the following executes very slowly in v15.00.27:

for %f in (*) (
echo %f
echo %f
echo %f
)

Unlike the following which executes in no time:

for %f in (*) (
echo %f
)
 

rconn

Administrator
Staff member
May 14, 2008
12,345
150
Because (1) you're not running the current build (15.00.30), and (2) you have "Duplicate CMD.EXE bugs enabled", and (3) you're probably using a non-default command separator (something other than &). Change any of those and it should work as expected.
 
Similar threads
Thread starter Title Forum Replies Date
K copy /w slow relative to robocopy /mir Support 0
vefatica Something got very slow (very recently) Support 1
D Slow deletes Support 4
vefatica Should it be this slow? Support 14
vefatica Forums slow? Support 2
vefatica ECHO is very slow Support 9
R Very slow performance with TCC-RT Support 2
S Paste in TCC/TCMD window is very slow [v20.0.22] Support 13
Mike Bryan Take Command gets slow, have to restart Support 3
Patulus GLOBAL command is very slow Support 28
greyfairer Very slow startup since last Windows 7 Update (14.03.59 x64) Support 9
A mkdir and rmdir very slow Support 5
vefatica CLS /C slow on Win7 Support 7
K alias creation very slow Support 6
C rmdir impossibly slow Support 2
JohnQSmith Slow network directory rename Support 8
H V12 UNZIP very slow under certain circumstances Support 3
Joe Caverly Slow CDD Support 0
K Copy Ftp on Server 2008 painfully slow Support 2
nickles Transient TCCs slow compared to transient CMDs Support 6
G Slow execution Support 9
nikbackm History loading slow Support 5
vefatica BBS slow as molasses Support 14
samintz How to? Abort on error DO loop Support 10
D How to use multi-line DO to loop through first level directory names Support 5
vefatica ON ERROR terminates DO loop. Support 0
Dick Johnson for ... do loop "wrap around" Support 11
vefatica Modifying a counted DO loop's counter? Support 1
Z [dos] into - for loop - the bp is not hit Support 5
vefatica Piping the output of a DO loop. Support 4
rps For loop internal %_for_files variable? Support 2
D What is the limit on the compound statement length within ( ) of a FOR-loop? Support 5
old coot Proper use of ON ERRORMSG inside a DO WHILE loop? Support 3
H EndLocal in DO Loop Support 2
B How to? redirect a bunch of loop Support 4
Mike Hall Unexpected "Variable loop" in IF condition Support 10
C FOR loop with nested IF / IFF Support 9
D Strange issue with FOR loop Support 15
nickles WAD Variable name gets changed within FOR loop Support 2
M tcmd crashes in this recursive "for /f" loop Support 4
S WAD %_do_errors does not report errors when loop control variable type is not directory entry Support 1
mikea 'Loop' on closing TC Support 6
Roedy Loop anomaly Support 6
R nested for loop question Support 3
P Need to use a regex in a "for" loop. Support 54

Similar threads