foxidrive wrote:It only occurs when clearing the %temp% variable
with all variables
11:39:20.48 - 11:39:21.84 Elapsed 136 cs
11:39:21.84 - 11:39:23.19 Elapsed 135 cs
11:39:23.19 - 11:39:24.55 Elapsed 136 cs
11:39:24.55 - 11:39:25.91 Elapsed 136 cs
11:39:25.92 - 11:39:27.29 Elapsed 137 cs
removing userprofile
11:39:27.29 - 11:39:28.66 Elapsed 137 cs
11:39:28.66 - 11:39:30.02 Elapsed 136 cs
11:39:30.02 - 11:39:31.37 Elapsed 135 cs
11:39:31.38 - 11:39:32.74 Elapsed 136 cs
11:39:32.74 - 11:39:34.10 Elapsed 136 cs
removing tmp
11:39:34.10 - 11:39:35.46 Elapsed 136 cs
11:39:35.46 - 11:39:36.81 Elapsed 135 cs
11:39:36.81 - 11:39:38.16 Elapsed 135 cs
11:39:38.16 - 11:39:39.51 Elapsed 135 cs
11:39:39.51 - 11:39:40.87 Elapsed 136 cs
removing temp
11:39:40.88 - 11:39:42.80 Elapsed 192 cs
11:39:42.80 - 11:39:44.71 Elapsed 191 cs
11:39:44.72 - 11:39:46.62 Elapsed 190 cs
11:39:46.63 - 11:39:48.53 Elapsed 190 cs
11:39:48.54 - 11:39:50.45 Elapsed 191 cs
I seem that occour in more complicated mode
Try this:
Code: Select all
@echo off
setlocal
echo with all variables
for /L %%a in (1,1,5) do call b1
rem goto :a
echo removing temp
set "TEMP="
for /L %%a in (1,1,5) do call b1
echo removing tmp
set "TMP="
for /L %%a in (1,1,5) do call b1
:a
echo removing userprofile
set "USERPROFILE="
for /L %%a in (1,1,5) do call b1
pause
result:
Code: Select all
with all variables
12:42:24,48 - 12:42:29,01 Elapsed 453 cs
12:42:29,01 - 12:42:33,54 Elapsed 453 cs
12:42:33,56 - 12:42:38,03 Elapsed 447 cs
12:42:38,03 - 12:42:43,07 Elapsed 504 cs
12:42:43,09 - 12:42:48,00 Elapsed 491 cs
removing temp
12:42:48,00 - 12:42:55,26 Elapsed 726 cs
12:42:55,28 - 12:43:01,32 Elapsed 604 cs
12:43:01,32 - 12:43:07,39 Elapsed 607 cs
12:43:07,40 - 12:43:12,34 Elapsed 494 cs
12:43:12,35 - 12:43:18,81 Elapsed 646 cs
removing tmp
12:43:18,81 - 12:43:23,73 Elapsed 492 cs
12:43:23,75 - 12:43:28,51 Elapsed 476 cs
12:43:28,53 - 12:43:33,10 Elapsed 457 cs
12:43:33,10 - 12:43:37,68 Elapsed 458 cs
12:43:37,68 - 12:43:42,40 Elapsed 472 cs
removing userprofile
12:43:42,42 - 12:43:53,39 Elapsed 1097 cs
12:43:53,39 - 12:44:04,31 Elapsed 1092 cs
12:44:04,31 - 12:44:15,23 Elapsed 1092 cs
12:44:15,23 - 12:44:26,15 Elapsed 1092 cs
12:44:26,15 - 12:44:37,06 Elapsed 1091 cs
b1 is unchanged but your machine is faster. You may need to lift the loop from 500 to 1000 or more
einstein1969