We can read a text file from command line using
type command. This command is similar to
cat command on Linux.
Example: Let us print the contents of the file
C:\>type c:\boot.ini [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Home Edition"
If the file is very huge, we can use
more command to read the data one page at a time. This more command is pretty much similar to the Linux
Syntax of the command is:
This command prints one page text on the console and waits for the user to press Enterbefore it shows the next page.
The above explained commands work in Windows 7, Windows 10 and all Server editions