stupid cmd.exe trick – sleep N via ping -n N+1

sure to be better ways to do this, but

doskey loop=for /l %%l in (1,1,1000000) do (cls $T $* $T ping -n 2 127.0.0.1 ^> nul)

so I can do “loop dir foo.txt” or whatever to check on the progress of a file.

SFU and bash are out there, just nice to have options in cmd.exe sometimes.

About these ads

One thought on “stupid cmd.exe trick – sleep N via ping -n N+1

Comments are closed.