On a Windows machine, we can open a text file from command prompt by just giving the file name.
For example to open a text file named file1.txt, we just need to type file1.txt in the command prompt and press ‘Enter’.
c:> file1.txt
Note that file name should have the extension as .txt otherwise command prompt would not be able to identify which application need to be used to open the file.
.\filename.txt
then hit enter.
more filename
Thank you. Your material proved to be very helpful.
I’m struggling to open a two word file.
Some files have underscores and hyphens, how do I open those?
Write ” Around the address name.
Example:
“C:\Users\User 1\Downloads\ChromeSetup.exe”
which command is used to show the contents of text file?
In command prompt, use the command TYPE to view the contents of the text file.
i.e. type C:\windows\system32\drivers\etc\hosts
This is a good way to create a Msge box in CMD
how to open many file and folder to text editor with terminal?, example i want to open laravel framework to text editor