How to write a FOR loop in windows 95 command prompt?

156 views Asked by At

I would like to write a simple script in win95 command prompt that enumerate integers and echo'es them. How can I write it?

Bonus question: is there a while loop available?

Pseudo code:

for i in (1,1,1000000) do echo i

It is surprisingly challenging since win95 is so old that I couldn't find any reliable info quickly.

Thanks

1

There are 1 answers

0
foxidrive On

Here is a solution using MSDOS6/WIN9x techniques.

@echo off
:loop
echo z>>tmp.tmp
find /c "z" <tmp.tmp
goto :loop