I start working with CMD and immediately I can not perform the first task of the tutorial – to create a cycle according to the instructions (although I copy the word word)
for %% i in (1,1,4) do (echo a)
It gives
Unforeseen appearance: %% i.
All other cycles also do not work. I tried to enter into quotes. Does not work. Maybe the problem is in the CMD itself? What are there any options?
(This is a console, not Bat, if that)
Answer 1, Authority 100%
Checked – Works, just in case I checked with % i
to call the error
PS C: \ Users \ Fireman & gt; D:
PS D: \ & GT; . \ Test.cmd.
D: \ & GT; for% i in (1 1 4) do (echo a)
D: \ & GT; (Echo a)
A.
D: \ & GT; (Echo a)
A.
D: \ & GT; (Echo a)
A.
PS D: \ & GT; . \ Test.cmd.
Unforeseen appearance: i.
D: \ & gt; for i in (1,1,4) do (echo a)
PS D: \ & GT;
Try it again Copy / write code in a separate .cmd and start
p.s.
In the command line, it works
for% i in (1, 2, 3) do echo% i
In PowerShell does not work – but this is another story 🙂