≡ Menu

Open text file from command line

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.

{ 2 comments… add one }
  • sumit September 24, 2013, 6:14 pm

    .\filename.txt
    then hit enter.

  • Suman Ghosh October 29, 2013, 8:18 am

    more filename

Leave a Comment