Search found 1 match

by Joddis
13 Feb 2018 14:41
Forum: DOS Batch Forum
Topic: Why does this not work?
Replies: 1
Views: 2081

Why does this not work?

FOR %%A IN (*.*) DO (
echo %%A
set myfilename=%%A
echo %%myfilename
)

The "set myfilename=%%A" does not work for each instance of the for loop, just one time .. so, the echo will only output the first filename and I don't understand why?

Thanks in advance!