Hello there,
my problem: I want to assign recursively the numbers of a counter to a string inside a for loopsetLocal EnableDelayedExpansion
set count = 0
for %f in (*.*) do (
set /a count+=1
echo "(0020,0013)=%count%" ????
)EndLocal
I want this:
first run: "(0020,0013)=1"
second run: "(0020,0013)=2"
...and so onthanks
Your code works fine if you use of "!" instead of "%" in the echo and if you add a second "%" in the for.
@echo off
setLocal EnableDelayedExpansion
set count = 0
for %%f in (*.*) do (
set /a count+=1
echo "(0020,0013)=!count!"
)
endlocalCheck the code and let me know if it is what you needed.
Thanks a lot David,
now it works correctly.best regards,
Luca
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |