why doesn't this work?
SET FIRST=""
SET COUNT=0
FOR %%F IN (dir *.png) DO (
IF %COUNT% NEQ 0 GOTO _skip
SET FIRST=%%F
:_skip
ECHO "%%F",
SET /A COUNT=COUNT+1
)
It sets FIRST
to the last *.png
because the IF
condition fails, because COUNT
- although is incremented by set /A
, the IF %COUNT%
doesn't ever work. Very frustrating.