Search code examples
windowsgrepheadwindows-console

How to print first 5 lines of the file in windows cmd


How can I print first 5 lines of the file in windows CMD?

There is a problem that I can't use PowerShell (spicific task) and batch scripts. Can you help me with this?


Solution

  • You should be able to use the more command in some regard.

    Maybe "more filename P 5"

    see http://support.microsoft.com/kb/227449