All Microsoft operating systems with their roots in DOS, which excludes NT and W2K, have a couple of device names that can be used as files.

CON and PRN are some of the more well-known ones.

You can actually enter

COPY AUTOEXEC.BAT CON

to output a file on the console window. Nothing too spectacular - but there is another, rather unknown device: CLOCK$.

Try

COPY CLOCK$ BLA.TXT

(wait for a couple of seconds)

press CTRL+C

and check the size of the remaining file with

DIR BLA.TXT

CLOCK$ can be read (nice to produce not-that-random binary data, but it can also be used to write stuff to. A favorite way to crash your own computer in the old days was using EDLIN CLOCK$ and rewriting it, which on many machines would ruin the BIOS settings, so Don't try this at home.

Log in or registerto write something here or to contact authors.