Yeah that's a weird one. I did Google, actually, to my shame, but didn't
spot anything useful. Figured it had to be something with the set command
though, after your last comment. Was playing around with text files named 1,
2, 3 prior to that
Yes, I suppose since security is increasingly important to people, little
quirks / loopholes like that will gradually disappear. Whether that's all
good, I don't know. 'In the olden days' you had complete mastery over your
computer to destroy it if you so chose, but were never likely to use that
power, since it was your own machine. The future is probably more and more
protection of a machine from any kind of destructive acts of programs, but
alongside that goes less and less control over the machine for the user and
increasing restrictions by the operating system - so more and more security
has a downside too.
Anyhow, I've wandered slightly. Thanks for the puzzle
--
Jon
It is no coincidence that "PapaDos said:
Wise guy/gal !
LOL
I hope you didn't Google for it...
Do you see a sort of "security flaw" in this ?
Don't post examples, but it could be use to do pretty bad things...
Anyone with a connection to the Microsoft guys ?
;-]
This is a VERY little known trick (up to now...) I discovered in DOS 5
(with
a slightly different syntax), years ago...
Have a nice day,
Luc.
--
Festina Lente
Jon said:
set a in (1 2 3) do @echo =%a in (5 6 7) do @echo %
FOR %a in (1 2 3) do @echo %a
?
--
Jon
It's certainly worth mentioning that "PapaDos"
<
[email protected]> had previously written the following
in
message Not bad, but it can be done without calling any other executable (BAT,
COM,
EXE, Scripts, Etc.), only with the available resources of CMD...
:-]
--
Festina Lente
:
I believe it was "PapaDos" <
[email protected]>, who
said
in
message A little puzzle for the command line experts.
;-]
In a CMD window, if I type:
FOR %a in (1 2 3) do @echo %a
I get the results:
5
6
7
What is the trick ?
How did I do that ?
--
Festina Lente
A good little puzzle that one

This will do it. Other ways, I'm sure as well.
doskey FOR=echo 5 ^&^& echo 6 ^&^& echo 7
FOR %a in (1 2 3) do @echo %a