26

How can I print the content of a textfile on the command prompt in Windows?

In Linux I can do this with less textfile.txt, more textfile.txt or cat textfile.txt

What is the command for this in Windows?

2 Answers 2

37

type textfile.txt If you want it page-by-page, more textfile.txt.

7
  • 7
    Or just more textfile.txt ... avoids a useless use of type
    – Joey
    Commented Jul 13, 2010 at 1:06
  • @Joey: Point taken.
    – Hello71
    Commented Jul 20, 2011 at 19:43
  • 2
    That was one hell of a lag ;)
    – Joey
    Commented Jul 20, 2011 at 21:15
  • @Joey: Just a year or so. About 31,536,000,000 ms latency.
    – Hello71
    Commented Jul 20, 2011 at 21:32
  • 1
    @Joey, Why do you say that type is useless? It's very useful for piping isn't it?
    – Pacerier
    Commented Mar 20, 2015 at 7:33
2

For printing the content of multiple files (e.g. textfile_1.txt, textfile_2.txt) the following, does also works :

    type textfile*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .