I'm running this command on a batch file:
for %I in (*.txt *.doc) do copy %I c:est2
...and it keeps returning:
I was unexpected at this time.
What is the cause of this error?
If you're running within a batch/cmd file, you need to double the % markers:
%
for %%i in (*.txt *.doc) do copy %%i c:est2
The single % variant only works from the command line.
2.1m questions
2.1m answers
60 comments
57.0k users