Table of contents
The infinite for
:* allows you run an infinite loop, with the possibility of stop in the next iteration using
for %%j in (:*) do ( echo j = %%j press a key for stop set "lastcode=!@kbhit!" if !lastcode! gtr 0 set "@next=" ) echo key pressed.