[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

type versus Copy in DOS



Harry Binswanger wrote:
Try doing:
type test.txt > test2.txt

It works.
Son of a gun! It does. But I NEVER heard of that. Type was for
display, copy for files and devices. What I wonder is, are these
just two commands that access the same routine (as I suspect TYPE
and PRINT are in Xy)? Neither is (at least in Vista, but I'm
fairly sure this was true in earlier versions too) a separate
command, both being, apparently, commands within command.com or
cmd.exe.
I tested this at the office on 2 machines: W2K with an HP
connected to a USB port, mapped to LPT2, and 98a with an HP
connected to a real lpt2. In both cases, both type and copy
worked. The one caveat is that when type worked, it did NOT
display the file on the screen. That only happened when I
mistyped the command or left a space, rather than >, between the
filename and lpt2.

--
Patricia M. Godfrey
priscamg@xxxxxxxx