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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s