On Unix I would do something like:
cat > file.txt
How can I do this on the Windows command prompt or batch file?
EDIT: Basically, I am looking for the functionality of cat
with no arguments (it reads from stdin and spits it back out to stdout).
TYPE CON
CON is the MS-DOS device for console input. You can redirect to a file as follows:
TYPE CON>output.txt
To terminate, hit Ctrl + C or Ctrl + Z, Enter (Ctrl + Z = EOF).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With